Correct mistake made on determination of whether it is a tag or not
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled

This commit is contained in:
Daniel Sheppard 2025-08-07 21:12:25 -05:00
parent 630d7aa4c2
commit 6c0dc8b630

View File

@ -75,7 +75,7 @@ def handle_changed_object(sender, instance, **kwargs):
event_type = OBJECT_UPDATED event_type = OBJECT_UPDATED
elif kwargs.get('action') == 'post_clear': elif kwargs.get('action') == 'post_clear':
# Handle clearing of an M2M field # Handle clearing of an M2M field
if isinstance(Tag, kwargs.get('model')) and getattr(instance, '_prechange_snapshot', {}).get('tags'): if kwargs.get('model') == Tag and getattr(instance, '_prechange_snapshot', {}).get('tags'):
# Handle generation of M2M changes for Tags which have a previous value (ignoring changes where the # Handle generation of M2M changes for Tags which have a previous value (ignoring changes where the
# prechange snapshot is empty) # prechange snapshot is empty)
m2m_changed = True m2m_changed = True