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

Adopt django-taggit-serializer for representation of assigned tags in the API

This commit is contained in:
Jeremy Stretch
2018-08-03 09:43:03 -04:00
committed by GitHub
parent ab37264ae1
commit f1bc88fc0c
11 changed files with 66 additions and 77 deletions

View File

@@ -101,8 +101,8 @@ def serialize_object(obj, extra=None):
}
# Include any tags
if hasattr(obj, 'tags'):
data['tags'] = [tag.name for tag in obj.tags.all()]
# if hasattr(obj, 'tags'):
# data['tags'] = [tag.name for tag in obj.tags.all()]
# Append any extra data
if extra is not None: