]> git.parisson.com Git - teleforma.git/commitdiff
fix objects
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Tue, 5 Mar 2024 09:52:25 +0000 (10:52 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Tue, 5 Mar 2024 09:52:25 +0000 (10:52 +0100)
teleforma/management/commands/teleforma-add-department.py

index 9f9cc1f2084778414604b15ec837b65158d8bf93..94be474a670d00b61266c2deac9c33ab61d6e700 100644 (file)
@@ -20,7 +20,7 @@ class Command(BaseCommand):
         domain = arg[2]
 
         organization = Organization.objects.get(name=organization_name)
-        department = Department(
+        department = Department.objects.get_or_create(
             organization=organization,
             name=name,
             domain=domain