From aff6f56cc0ba47428b6a83b5f0b6a44888e4c1b1 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 20 Sep 2016 07:47:16 +0200 Subject: [PATCH] Improving load_dump command --- taiga/export_import/management/commands/load_dump.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taiga/export_import/management/commands/load_dump.py b/taiga/export_import/management/commands/load_dump.py index 8a4ca585..b04a1602 100644 --- a/taiga/export_import/management/commands/load_dump.py +++ b/taiga/export_import/management/commands/load_dump.py @@ -65,6 +65,10 @@ class Command(BaseCommand): except Project.DoesNotExist: pass signals.post_delete.receivers = receivers_back + else: + slug = data.get('slug', None) + if slug is not None and Project.objects.filter(slug=slug).exists(): + del data['slug'] user = User.objects.get(email=owner_email) services.store_project_from_dict(data, user)