Skip to content

Commit

Permalink
Fixes #94: Resolve model field name for custom field data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Sep 10, 2024
1 parent 0fa0955 commit d8f1cfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions netbox_branching/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def update_object(instance, data, using):
m2m_assignments = {}

for attr, value in data.items():
# Account for custom field data
if attr == 'custom_fields':
attr = 'custom_field_data'

model_field = instance._meta.get_field(attr)
field_cls = model_field.__class__

Expand Down

0 comments on commit d8f1cfd

Please sign in to comment.