mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 18:08:38 -06:00
Record tags when serializing an object for an ObjectChange
This commit is contained in:
parent
208409110f
commit
289a762bf1
@ -100,6 +100,10 @@ def serialize_object(obj, extra=None):
|
|||||||
field.name: value for field, value in obj.get_custom_fields().items()
|
field.name: value for field, value in obj.get_custom_fields().items()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Include any tags
|
||||||
|
if hasattr(obj, 'tags'):
|
||||||
|
data['tags'] = [tag.name for tag in obj.tags.all()]
|
||||||
|
|
||||||
# Append any extra data
|
# Append any extra data
|
||||||
if extra is not None:
|
if extra is not None:
|
||||||
data.update(extra)
|
data.update(extra)
|
||||||
|
Loading…
Reference in New Issue
Block a user