From 8396e2e649bea60e11e2741427916d4bf30e876a Mon Sep 17 00:00:00 2001 From: Vinicius Aguiar Date: Sat, 28 Oct 2023 17:11:29 -0300 Subject: [PATCH] fix: remove cascade from load fixture command (#470) --- bd_api/apps/core/management/commands/loadfixture.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bd_api/apps/core/management/commands/loadfixture.py b/bd_api/apps/core/management/commands/loadfixture.py index be786d54..2fea3692 100644 --- a/bd_api/apps/core/management/commands/loadfixture.py +++ b/bd_api/apps/core/management/commands/loadfixture.py @@ -51,9 +51,9 @@ def handle(self, *args, **options) -> str | None: print("Purge database restrictions") with connection.cursor() as cursor: - cursor.execute(f"{DB_STATEMENT} auth_permission CASCADE") - cursor.execute(f"{DB_STATEMENT} django_admin_log CASCADE") - cursor.execute(f"{DB_STATEMENT} django_content_type CASCADE") + cursor.execute(f"{DB_STATEMENT} auth_permission") + cursor.execute(f"{DB_STATEMENT} django_admin_log") + cursor.execute(f"{DB_STATEMENT} django_content_type") print("Load fixtures") response = super().handle(*args, **options)