From 43e0f8189abc426b2aac6bfbed36fda629e0c375 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Thu, 2 Mar 2023 21:32:22 +0800 Subject: [PATCH] Try query --- api/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: