8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 08:23: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()
domain = Domain()
domain.name = self.pseudo.replace('_','-').lower() + str(all_machines.count())
domain.interface_parent = interface_cible
domain.clean()
machine_parent.save()
interface_cible.machine = machine_parent
interface_cible.save()