8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +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 98131ef31a
commit edca49dcf1

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