-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
type: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
Hi,
I'm currently testing around with tags and tried to append a tag to my interface. When I call the save() function, it doesn't seem to properly register any changes and as such does not perform the update. If I update another field such as the description, the change is however stored.
Hopefully the following code illustrates the issue:
>>> import pynetbox
>>> nb = pynetbox.api(url='https://sub.domain.tld/', token='0123456789abcdef0123456789abcdef01234567')
>>> intf = nb.dcim.interfaces.get(name='eth0')
>>> intf.tags
[]
>>> intf.tags.append('27')
>>> intf.save()
False
>>> nb.dcim.interfaces.get(name='eth0').tags
[]
>>> intf.description = 'test'
>>> intf.save()
True
>>> nb.dcim.interfaces.get(name='eth0').tags
['27']
I just tested tagging a device and met the same problem there, it seems like the issue is related to the tags attribute rather than interface object being incorrectly handled.
Metadata
Metadata
Assignees
Labels
type: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application