mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[1.7.x] Use __first__ not __latest__ for unknown app dependencies
This commit is contained in:
		| @@ -9,7 +9,7 @@ class Migration(migrations.Migration): | |||||||
|  |  | ||||||
|     dependencies = [ |     dependencies = [ | ||||||
|         migrations.swappable_dependency(settings.AUTH_USER_MODEL), |         migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||||||
|         ('contenttypes', '__latest__'), |         ('contenttypes', '__first__'), | ||||||
|     ] |     ] | ||||||
|  |  | ||||||
|     operations = [ |     operations = [ | ||||||
|   | |||||||
| @@ -244,10 +244,10 @@ class MigrationAutodetector(object): | |||||||
|                                 if self.migrations.get(dep[0], None): |                                 if self.migrations.get(dep[0], None): | ||||||
|                                     operation_dependencies.add((dep[0], self.migrations[dep[0]][-1].name)) |                                     operation_dependencies.add((dep[0], self.migrations[dep[0]][-1].name)) | ||||||
|                                 else: |                                 else: | ||||||
|                                     # If we can't find the other app, we add a __latest__ dependency, |                                     # If we can't find the other app, we add a __first__ dependency, | ||||||
|                                     # but only if we've already been through once and checked everything |                                     # but only if we've already been through once and checked everything | ||||||
|                                     if chop_mode: |                                     if chop_mode: | ||||||
|                                         operation_dependencies.add((dep[0], "__latest__")) |                                         operation_dependencies.add((dep[0], "__first__")) | ||||||
|                                     else: |                                     else: | ||||||
|                                         deps_satisfied = False |                                         deps_satisfied = False | ||||||
|                     if deps_satisfied: |                     if deps_satisfied: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user