Undo of delete person on dbapi fails; fixes #10070
This commit is contained in:
parent
8f69201a70
commit
a1205009f4
@ -670,11 +670,11 @@ class DBAPI(DbGeneric):
|
|||||||
if self.readonly or not handle:
|
if self.readonly or not handle:
|
||||||
return
|
return
|
||||||
if self.has_handle(obj_key, handle):
|
if self.has_handle(obj_key, handle):
|
||||||
|
data = self.get_raw_data(obj_key, handle)
|
||||||
table = KEY_TO_NAME_MAP[obj_key]
|
table = KEY_TO_NAME_MAP[obj_key]
|
||||||
sql = "DELETE FROM %s WHERE handle = ?" % table
|
sql = "DELETE FROM %s WHERE handle = ?" % table
|
||||||
self.dbapi.execute(sql, [handle])
|
self.dbapi.execute(sql, [handle])
|
||||||
if not transaction.batch:
|
if not transaction.batch:
|
||||||
data = self.get_raw_data(obj_key, handle)
|
|
||||||
transaction.add(obj_key, TXNDEL, handle, data, None)
|
transaction.add(obj_key, TXNDEL, handle, data, None)
|
||||||
|
|
||||||
def find_backlink_handles(self, handle, include_classes=None):
|
def find_backlink_handles(self, handle, include_classes=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user