From fdfa4755e9714b892fa3b59c3e1bbed29c47e62a Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 19 Sep 2018 20:52:31 -0400 Subject: [PATCH] Don't use a hardcoded database alias for the destination of the database conversion. Signed-off-by: Roberto Rosario --- mayan/apps/common/management/commands/convertdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mayan/apps/common/management/commands/convertdb.py b/mayan/apps/common/management/commands/convertdb.py index 1c7772955e..5d5d563b19 100644 --- a/mayan/apps/common/management/commands/convertdb.py +++ b/mayan/apps/common/management/commands/convertdb.py @@ -73,7 +73,7 @@ class Command(management.BaseCommand): format='json' ) - if DocumentType.objects.using('default').count() and not options['force']: + if DocumentType.objects.using(options['to']).count() and not options['force']: fs_cleanup(convertdb_file_path) raise CommandError( 'There is existing data in the database that will be '