diff --git a/backend/open_webui/models/automations.py b/backend/open_webui/models/automations.py index c0a7416cc6..d3c0649455 100644 --- a/backend/open_webui/models/automations.py +++ b/backend/open_webui/models/automations.py @@ -179,8 +179,8 @@ class AutomationTable: async with get_async_db_context(db) as db: stmt = select(Automation).filter_by(user_id=user_id) - if folder_id is not None: - stmt = stmt.filter(Automation.folder_id == (folder_id or None)) + if folder_id: + stmt = stmt.filter(Automation.folder_id == folder_id) if query: search = f'%{query}%'