From 55ed331f4deeb4350d58e6a06a9820048c331cc3 Mon Sep 17 00:00:00 2001 From: DrMelone <27028174+Classic298@users.noreply.github.com> Date: Sun, 12 Apr 2026 22:06:23 +0200 Subject: [PATCH] fix: add missing await on filter_allowed_access_grants in import_models --- backend/open_webui/routers/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/models.py b/backend/open_webui/routers/models.py index 56fb6a26ca..0c9854b61f 100644 --- a/backend/open_webui/routers/models.py +++ b/backend/open_webui/routers/models.py @@ -326,7 +326,7 @@ async def import_models( # in the payload to avoid altering existing ACLs on # metadata-only imports. if 'access_grants' in model_data: - updated_model.access_grants = filter_allowed_access_grants( + updated_model.access_grants = await filter_allowed_access_grants( request.app.state.config.USER_PERMISSIONS, user.id, user.role, @@ -339,7 +339,7 @@ async def import_models( model_data['meta'] = model_data.get('meta', {}) model_data['params'] = model_data.get('params', {}) new_model = ModelForm(**model_data) - new_model.access_grants = filter_allowed_access_grants( + new_model.access_grants = await filter_allowed_access_grants( request.app.state.config.USER_PERMISSIONS, user.id, user.role,