8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-26 08:53:46 +00:00

Hot fix : empèche le save d'une interface/machine si le name est déjà pris par un domain

This commit is contained in:
Gabriel Detraz 2017-09-28 15:29:48 +00:00 committed by Mael Kervella
parent fe1e97b65c
commit 410df91d61

View file

@ -474,6 +474,8 @@ class User(AbstractBaseUser):
machine_parent.clean() machine_parent.clean()
domain = Domain() domain = Domain()
domain.name = self.pseudo.replace('_','-').lower() + str(all_machines.count()) domain.name = self.pseudo.replace('_','-').lower() + str(all_machines.count())
domain.interface_parent = interface_cible
domain.clean()
machine_parent.save() machine_parent.save()
interface_cible.machine = machine_parent interface_cible.machine = machine_parent
interface_cible.save() interface_cible.save()