From 3e3c21b3754d447bdb11928b3e97072445cd122e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 29 Jan 2015 03:48:31 -0400 Subject: [PATCH] Don't try to link tags to documents until documents are created. Issue #154. --- .../0002_auto__add_tag__chg_field_tagproperties_tag.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py b/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py index 30029119a8..1eed0fcf11 100644 --- a/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py +++ b/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py @@ -5,6 +5,9 @@ from django.db import models class Migration(SchemaMigration): + depends_on = ( + ('documents', '0001_initial'), + ) def forwards(self, orm): # Adding model 'Tag' @@ -18,7 +21,7 @@ class Migration(SchemaMigration): # Adding M2M table for field document on 'Tag' m2m_table_name = db.shorten_name(u'tags_tag_document') db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('id', models.AutoField(primary_key=True, auto_created=True)), ('tag', models.ForeignKey(orm[u'tags.tag'], null=False)), ('document', models.ForeignKey(orm[u'documents.document'], null=False)) ))