From: Guillaume Pellerin Date: Tue, 5 Mar 2024 09:52:25 +0000 (+0100) Subject: fix objects X-Git-Tag: 1.9.0-tc~17 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=102f3888d5b9bced7de6cf4c374e9a7bc5d0f321;p=teleforma.git fix objects --- diff --git a/teleforma/management/commands/teleforma-add-department.py b/teleforma/management/commands/teleforma-add-department.py index 9f9cc1f2..94be474a 100644 --- a/teleforma/management/commands/teleforma-add-department.py +++ b/teleforma/management/commands/teleforma-add-department.py @@ -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