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
To let me delete django polymorphic items I have employed the workaround of updating any fields that are bytefields to None before deleting them.
# `TrackedModelCheck` is my polymorphic model, and `content_hash` is my bytefieldmodels=TrackedModelCheck.objects.filter(model__transaction__workbasket__pk=workbasket_pk)
models.update(content_hash=None)
models.delete()
Djangos BinaryField returns a memoryview when you retrieve it, this can't be pickled which causes .delete() to fail when it calls
deepcopy
-The text was updated successfully, but these errors were encountered: