From 00565655b7defa94ac89da5bfd8719c6b74326b5 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 2 Jul 2025 15:31:14 +0300 Subject: Fix empty change_ids in fetch_case_attrs_changes to return {}. Signed-off-by: Munyoki Kilyungi --- gn3/db/case_attributes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gn3/db/case_attributes.py') diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py index 48afc0c..a81bc07 100644 --- a/gn3/db/case_attributes.py +++ b/gn3/db/case_attributes.py @@ -106,6 +106,8 @@ def __fetch_case_attrs_changes__(cursor, change_ids: tuple) -> list: causing a database error. """ + if not change_ids: + return {} placeholders = ','.join(['%s'] * len(change_ids)) cursor.execute( "SELECT editor, json_diff_data, time_stamp " -- cgit 1.4.1