Commit edca49dc authored by Gabriel Detraz's avatar Gabriel Detraz Committed by Mael Kervella
Browse files

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

parent 98131ef3
...@@ -474,6 +474,8 @@ class User(AbstractBaseUser): ...@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment