From 102f3888d5b9bced7de6cf4c374e9a7bc5d0f321 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 5 Mar 2024 10:52:25 +0100 Subject: [PATCH] fix objects --- teleforma/management/commands/teleforma-add-department.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5