Skip to content

Commit

Permalink
Merge pull request #1071 from mozisan/correct-no-utf8-option-in-reset-db
Browse files Browse the repository at this point in the history
�reset_db command: Fix problem that 'utf8_support' option is ignored
  • Loading branch information
trbs committed Jul 3, 2017
2 parents db0f971 + 0791541 commit 7c1d541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_extensions/management/commands/reset_db.py
Expand Up @@ -122,7 +122,7 @@ def handle(self, *args, **options):

connection = Database.connect(**kwargs)
drop_query = 'DROP DATABASE IF EXISTS `%s`' % database_name
utf8_support = options.get('no_utf8_support', False) and '' or 'CHARACTER SET utf8'
utf8_support = 'CHARACTER SET utf8' if options.get('no_utf8_support', False) else ''
create_query = 'CREATE DATABASE `%s` %s' % (database_name, utf8_support)
logging.info('Executing... "' + drop_query + '"')
connection.query(drop_query)
Expand Down

0 comments on commit 7c1d541

Please sign in to comment.