From f8ac75d188b7e07906aa1d5e648e3fc25a78ef2b Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 10 Aug 2026 19:21:52 -0600 Subject: [PATCH] refac --- backend/open_webui/models/automations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}%'