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 '