8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

Fix port edition crash with new convention for *_id

This commit is contained in:
Gabriel Detraz 2020-08-08 23:56:00 +02:00 committed by root
parent ee8948dfb6
commit 7535050d4f

View file

@ -859,14 +859,14 @@ class Port(AclMixin, RevMixin, models.Model):
return Switch.nothing_profile()
@classmethod
def get_instance(cls, portid, *_args, **kwargs):
def get_instance(cls, port_id, *_args, **kwargs):
return (
cls.objects.select_related("machine_interface__domain__extension")
.select_related("machine_interface__machine__switch")
.select_related("room")
.select_related("related")
.prefetch_related("switch__interface_set__domain__extension")
.get(pk=portid)
.get(pk=port_id)
)
def make_port_related(self):