8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-21 19:03:11 +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
parent 8182505fd2
commit 0df3542ec1

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):