Skip to content

Commit

Permalink
pop fields to exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
meganerd committed Feb 7, 2025
1 parent 6285662 commit 5e4ab68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nautobot_golden_config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ def to_objectchange(
if not object_data_exclude:
object_data_exclude = fields_to_exclude
data_v2 = serialize_object_v2(self)
for field in fields_to_exclude:
data_v2.pop(field)
return ObjectChange(
changed_object=self,
object_repr=str(self),
Expand Down

0 comments on commit 5e4ab68

Please sign in to comment.