Skip to content

Commit

Permalink
fix: πŸ› Add mask_length update to IPAddress.update()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrew82 committed Oct 30, 2024
1 parent 759ca39 commit f9925d6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ def create(cls, adapter, ids, attrs):
def update(self, attrs):
"""Update IPAddress in Nautobot from IPAddress object."""
ipaddr = IPAddress.objects.get(id=self.uuid)
if "mask_length" in attrs:
ipaddr.mask_length = attrs["mask_length"]
if "tenant" in attrs:
if attrs.get("tenant"):
ipaddr.tenant_id = self.adapter.tenant_map[attrs["tenant"]]
Expand Down

0 comments on commit f9925d6

Please sign in to comment.