1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #6492: Correct tag population in post-change data resulting from REST API changes

This commit is contained in:
jeremystretch
2021-06-02 17:02:44 -04:00
parent 1658d7ae86
commit 0a0b852f2c
2 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,7 @@ def serialize_object(obj, extra=None):
# Include any tags. Check for tags cached on the instance; fall back to using the manager.
if is_taggable(obj):
tags = getattr(obj, '_tags', obj.tags.all())
tags = getattr(obj, '_tags', None) or obj.tags.all()
data['tags'] = [tag.name for tag in tags]
# Append any extra data