Improve update snapshot
This commit is contained in:
@@ -192,7 +192,10 @@ def take_snapshot(name: str, tag: str) -> int | None:
|
||||
def update_snapshot(name: str, operation: int, tag: str) -> None:
|
||||
if tag == None or tag == '':
|
||||
return None
|
||||
write(name, f"update snapshot_operation set tag = '{tag}' where id = {operation}")
|
||||
if have_snapshot_for_operation(name, operation):
|
||||
write(name, f"update snapshot_operation set tag = '{tag}' where id = {operation}")
|
||||
else:
|
||||
take_snapshot_for_operation(name, operation, tag)
|
||||
|
||||
|
||||
def update_snapshot_for_current_operation(name: str, tag: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user