Skip to content

Commit b28818d

Browse files
minor
1 parent a661458 commit b28818d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

datajoint/table.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def delete(self, verbose=True):
406406
print('About to delete:')
407407

408408
if not already_in_transaction:
409-
self.connection.start_transaction()
409+
conn.start_transaction()
410410
total = 0
411411
try:
412412
for name, table in reversed(list(delete_list.items())):
@@ -418,25 +418,25 @@ def delete(self, verbose=True):
418418
except:
419419
# Delete failed, perhaps due to insufficient privileges. Cancel transaction.
420420
if not already_in_transaction:
421-
self.connection.cancel_transaction()
421+
conn.cancel_transaction()
422422
raise
423423
else:
424424
assert not (already_in_transaction and safe)
425425
if not total:
426426
print('Nothing to delete')
427427
if not already_in_transaction:
428-
self.connection.cancel_transaction()
428+
conn.cancel_transaction()
429429
else:
430430
if already_in_transaction:
431431
if verbose:
432432
print('The delete is pending within the ongoing transaction.')
433433
else:
434434
if not safe or user_choice("Proceed?", default='no') == 'yes':
435-
self.connection.commit_transaction()
435+
conn.commit_transaction()
436436
if verbose or safe:
437437
print('Committed.')
438438
else:
439-
self.connection.cancel_transaction()
439+
conn.cancel_transaction()
440440
if verbose or safe:
441441
print('Cancelled deletes.')
442442

0 commit comments

Comments
 (0)