Skip to content

Updating tags attribute on object fails #94

@jord-bh

Description

@jord-bh

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

No one assigned

    Labels

    type: bugA confirmed report of unexpected behavior in the application

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions