Don't use a hardcoded database alias for the destination of the database conversion.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-19 20:52:31 -04:00
parent 74d45212ec
commit fdfa4755e9

View File

@@ -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 '