fix oob ip signal

This commit is contained in:
Jamie Murphy 2023-07-24 22:07:31 +01:00
parent d267e42674
commit bdd7afb875
No known key found for this signature in database
GPG Key ID: 10EDAE1E6D858F5F

View File

@ -70,7 +70,7 @@ def clear_oob_ip(instance, **kwargs):
When an IPAddress is deleted, trigger save() on any Devices/VirtualMachines for which it
was a OOB IP.
"""
field_name = f'oob_ip{instance.family}'
field_name = f'oob_ip'
device = Device.objects.filter(**{field_name: instance}).first()
if device:
device.save()