Code refactor for change set
This commit is contained in:
@@ -10,7 +10,7 @@ def get_title(name: str) -> dict[str, Any]:
|
||||
return { 'value': title['value'] }
|
||||
|
||||
|
||||
def set_title_cache(name: str, cs: ChangeSet) -> SqlChangeSet:
|
||||
def set_title_cache(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
new = cs.operations[0]['value']
|
||||
old = get_title(name)['value']
|
||||
|
||||
@@ -20,7 +20,7 @@ def set_title_cache(name: str, cs: ChangeSet) -> SqlChangeSet:
|
||||
redo_cs = g_update_prefix | { 'type': 'title', 'value': new }
|
||||
undo_cs = g_update_prefix | { 'type': 'title', 'value': old }
|
||||
|
||||
return SqlChangeSet(redo_sql, undo_sql, redo_cs, undo_cs)
|
||||
return DbChangeSet(redo_sql, undo_sql, [redo_cs], [undo_cs])
|
||||
|
||||
|
||||
def set_title(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
|
||||
Reference in New Issue
Block a user