mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fixed migration order
This commit is contained in:
		| @@ -12,8 +12,9 @@ def re_slug_all_the_things(apps, schema_editor): | ||||
|  | ||||
|     Tag = apps.get_model("documents", "Tag") | ||||
|     Correspondent = apps.get_model("documents", "Correspondent") | ||||
|     DocumentType = apps.get_model("documents", "DocumentType") | ||||
|  | ||||
|     for klass in (Tag, Correspondent): | ||||
|     for klass in (Tag, Correspondent, DocumentType): | ||||
|         for instance in klass.objects.all(): | ||||
|             klass.objects.filter( | ||||
|                 pk=instance.pk | ||||
| @@ -25,7 +26,7 @@ def re_slug_all_the_things(apps, schema_editor): | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|         ('documents', '0021_document_storage_type'), | ||||
|         ('documents', '1003_auto_20180904_1425'), | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
| @@ -48,5 +49,10 @@ class Migration(migrations.Migration): | ||||
|             name='slug', | ||||
|             field=models.SlugField(blank=True, editable=False), | ||||
|         ), | ||||
|         migrations.AlterField( | ||||
|             model_name='documenttype', | ||||
|             name='slug', | ||||
|             field=models.SlugField(blank=True, editable=False), | ||||
|         ), | ||||
|         migrations.RunPython(re_slug_all_the_things, migrations.RunPython.noop) | ||||
|     ] | ||||
|   | ||||
| @@ -6,7 +6,7 @@ from django.db import migrations, models | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|         ('documents', '0022_auto_20181007_1420'), | ||||
|         ('documents', '0021_document_storage_type'), | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler