mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #9891: Ensure consistent ordering for tags during object serialization
This commit is contained in:
@@ -148,7 +148,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', None) or obj.tags.all()
|
||||
data['tags'] = [tag.name for tag in tags]
|
||||
data['tags'] = sorted([tag.name for tag in tags])
|
||||
|
||||
# Append any extra data
|
||||
if extra is not None:
|
||||
|
Reference in New Issue
Block a user