Skip to content

Commit

Permalink
Ensure object of the reference (senaite#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski authored Jan 11, 2023
1 parent 8824825 commit 25295ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/senaite/core/upgrade/v02_04_000.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,5 +435,6 @@ def purge_backreferences_to(obj):
relationship = "{}{}".format(portal_type, field.getName())
references = filter(None, references)
for reference in references:
back_storage = get_storage(reference)
refob = api.get_object(reference)
back_storage = get_storage(refob)
back_storage.pop(relationship, None)

0 comments on commit 25295ca

Please sign in to comment.