Skip to content

Commit 0a0b852

Browse files
committed
Fixes #6492: Correct tag population in post-change data resulting from REST API changes
1 parent 1658d7a commit 0a0b852

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/release-notes/version-2.11.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [#6064](https://github.com/netbox-community/netbox/issues/6064) - Fix object permission assignments for user and group models
1414
* [#6217](https://github.com/netbox-community/netbox/issues/6217) - Disallow passing of string values for integer custom fields
1515
* [#6284](https://github.com/netbox-community/netbox/issues/6284) - Avoid sending redundant webhooks when adding/removing tags
16+
* [#6492](https://github.com/netbox-community/netbox/issues/6492) - Correct tag population in post-change data resulting from REST API changes
1617
* [#6496](https://github.com/netbox-community/netbox/issues/6496) - Fix upgrade script when Python installed in nonstandard path
1718
* [#6502](https://github.com/netbox-community/netbox/issues/6502) - Correct permissions evaluation for running a report via the REST API
1819
* [#6517](https://github.com/netbox-community/netbox/issues/6517) - Fix assignment of user when creating rack reservations via REST API

netbox/utilities/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def serialize_object(obj, extra=None):
105105

106106
# Include any tags. Check for tags cached on the instance; fall back to using the manager.
107107
if is_taggable(obj):
108-
tags = getattr(obj, '_tags', obj.tags.all())
108+
tags = getattr(obj, '_tags', None) or obj.tags.all()
109109
data['tags'] = [tag.name for tag in tags]
110110

111111
# Append any extra data

0 commit comments

Comments
 (0)