diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index 466adc4f1b..ae174a65ab 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -584,13 +584,14 @@ OAUTH_ALLOWED_ROLES = PersistentConfig( [ role.strip() for role in os.environ.get("OAUTH_ALLOWED_ROLES", f"user{SEP}admin").split(SEP) + if role ], ) OAUTH_ADMIN_ROLES = PersistentConfig( "OAUTH_ADMIN_ROLES", "oauth.admin_roles", - [role.strip() for role in os.environ.get("OAUTH_ADMIN_ROLES", "admin").split(SEP)], + [role.strip() for role in os.environ.get("OAUTH_ADMIN_ROLES", "admin").split(SEP) if role], ) OAUTH_ALLOWED_DOMAINS = PersistentConfig(