mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29831 -- Added validation for makemigrations --name.
This commit is contained in:
committed by
Tim Graham
parent
136a900ef9
commit
10d82c85aa
@@ -61,6 +61,8 @@ class Command(BaseCommand):
|
||||
self.merge = options['merge']
|
||||
self.empty = options['empty']
|
||||
self.migration_name = options['name']
|
||||
if self.migration_name and not self.migration_name.isidentifier():
|
||||
raise CommandError('The migration name must be a valid Python identifier.')
|
||||
check_changes = options['check_changes']
|
||||
|
||||
# Make sure the app they asked for exists
|
||||
|
||||
Reference in New Issue
Block a user