Fix case query when input is none
@@ -1664,6 +1664,9 @@ class SQLAlchemySocket:
Updated count
"""
+ if not task_ids:
+ return 0
+
update_fields = dict(status=TaskStatusEnum.complete, modified_on=dt.utcnow())
with self.session_scope() as session:
# assuming all task_ids are valid, then managers will be in order by id
@@ -1692,6 +1695,9 @@ class SQLAlchemySocket:
"""
+ if not data:
+ return 0
+
task_ids = []
with self.session_scope() as session:
# Make sure retuened results are in the same order as the task ids
