mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-28 10:16:10 -06:00
Clarify comment
This commit is contained in:
parent
15541c6440
commit
a86cd9dfc6
@ -76,7 +76,8 @@ def handle_changed_object(sender, instance, **kwargs):
|
|||||||
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 isinstance(Tag, kwargs.get('model')) and getattr(instance, '_prechange_snapshot', {}).get('tags'):
|
||||||
# Handle tags as it is a Generic M2M
|
# Handle generation of M2M changes for Tags which have a previous value (ignoring changes where the
|
||||||
|
# prechange snapshot is empty)
|
||||||
m2m_changed = True
|
m2m_changed = True
|
||||||
event_type = OBJECT_UPDATED
|
event_type = OBJECT_UPDATED
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user