diff --git a/api/database.py b/api/database.py index 3e17798..4b1dc73 100644 --- a/api/database.py +++ b/api/database.py @@ -163,11 +163,11 @@ def execute_redo(name: str) -> ChangeSet: def have_snapshot(name: str, tag: str) -> bool: - return read(name, f"select id from snapshot_operation where tag = '{tag}'") != None + return try_read(name, f"select id from snapshot_operation where tag = '{tag}'") != None def have_snapshot_for_operation(name: str, operation: int) -> bool: - return read(name, f"select id from snapshot_operation where id = {operation}") != None + return try_read(name, f"select id from snapshot_operation where id = {operation}") != None def have_snapshot_for_current_operation(name: str) -> bool: