You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't pass super.delete kwargs to Part.delete #1276
Part.delete does not allow pass-through of kwargs to the super.delete call.
This prevents some functionality
e.g. I want to wrap several operations including Part.delete in a single transaction. Since I can't pass transaction=False to Part.delete (I think) this is not possible
The Part.delete() method now accepts and passes through **kwargs to super().delete().
Implementation
defdelete(self, part_integrity: str="enforce", **kwargs):
""" Delete from a Part table. Args: part_integrity: Policy for master-part integrity. One of: - "enforce" (default): Error - delete from master instead. - "ignore": Allow direct deletion (breaks master-part integrity). - "cascade": Delete parts AND cascade up to delete master. **kwargs: Additional arguments passed to Table.delete() (transaction, prompt) """ifpart_integrity=="enforce":
raiseDataJointError(...)
super().delete(part_integrity=part_integrity, **kwargs)
Usage
You can now pass transaction=False to wrap Part deletes in your own transaction:
withdj.conn().transaction:
# Multiple operations in single transactionMasterTable.Part().delete(part_integrity="ignore", transaction=False)
other_operations()
Activity
github-actions commentedon Dec 1, 2025
This issue is stale because it has been open for 45 days with no activity.
Allow Part.delete to pass kwargs through to Table.delete
Add test for Part.delete kwargs pass-through
Fix Part.delete to pass through kwargs to Table.delete
dimitri-yatsenko commentedon Jan 9, 2026
Fixed in PR #1313
The
Part.delete()method now accepts and passes through**kwargstosuper().delete().Implementation
Usage
You can now pass
transaction=Falseto wrap Part deletes in your own transaction:This will be available once #1313 is merged.
dimitri-yatsenko commentedon Jan 9, 2026
Fixed in PR #1313 (merged). Part.delete() now passes **kwargs to super().delete().