From bdacc7beba4ef80302e13cde71b8cd0367b45dc4 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 16 Feb 2014 16:55:39 +0100 Subject: [PATCH] Renamed typo on schema --- ...e_db_model__add_field_attribute_db_attrype__ad.py | 12 ++++++------ .../0008_converting_tags_attribute_categories.py | 2 +- src/typeclasses/models.py | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/typeclasses/migrations/0007_auto__add_field_attribute_db_model__add_field_attribute_db_attrype__ad.py b/src/typeclasses/migrations/0007_auto__add_field_attribute_db_model__add_field_attribute_db_attrype__ad.py index 8ba02a2aea..1edcf252bb 100644 --- a/src/typeclasses/migrations/0007_auto__add_field_attribute_db_model__add_field_attribute_db_attrype__ad.py +++ b/src/typeclasses/migrations/0007_auto__add_field_attribute_db_model__add_field_attribute_db_attrype__ad.py @@ -13,8 +13,8 @@ class Migration(SchemaMigration): self.gf('django.db.models.fields.CharField')(db_index=True, max_length=32, null=True, blank=True), keep_default=False) - # Adding field 'Attribute.db_attrype' - db.add_column(u'typeclasses_attribute', 'db_attrype', + # Adding field 'Attribute.db_attrtype' + db.add_column(u'typeclasses_attribute', 'db_attrtype', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=16, null=True, blank=True), keep_default=False) @@ -33,8 +33,8 @@ class Migration(SchemaMigration): # Deleting field 'Attribute.db_model' db.delete_column(u'typeclasses_attribute', 'db_model') - # Deleting field 'Attribute.db_attrype' - db.delete_column(u'typeclasses_attribute', 'db_attrype') + # Deleting field 'Attribute.db_attrtype' + db.delete_column(u'typeclasses_attribute', 'db_attrtype') # Deleting field 'Tag.db_model' db.delete_column(u'typeclasses_tag', 'db_model') @@ -46,7 +46,7 @@ class Migration(SchemaMigration): models = { u'typeclasses.attribute': { 'Meta': {'object_name': 'Attribute'}, - 'db_attrype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}), + 'db_attrtype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}), 'db_category': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), 'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), @@ -67,4 +67,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['typeclasses'] \ No newline at end of file + complete_apps = ['typeclasses'] diff --git a/src/typeclasses/migrations/0008_converting_tags_attribute_categories.py b/src/typeclasses/migrations/0008_converting_tags_attribute_categories.py index 53cd1cef36..2c801041ea 100644 --- a/src/typeclasses/migrations/0008_converting_tags_attribute_categories.py +++ b/src/typeclasses/migrations/0008_converting_tags_attribute_categories.py @@ -237,7 +237,7 @@ class Migration(DataMigration): }, u'typeclasses.attribute': { 'Meta': {'object_name': 'Attribute'}, - 'db_attrype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}), + 'db_attrtype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}), 'db_category': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}), 'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), diff --git a/src/typeclasses/models.py b/src/typeclasses/models.py index 59a092c021..cdac56c3f5 100644 --- a/src/typeclasses/models.py +++ b/src/typeclasses/models.py @@ -109,7 +109,7 @@ class Attribute(SharedMemoryModel): # Which model of object this Attribute is attached to (A natural key like objects.dbobject) db_model = models.CharField('model', max_length=32, db_index=True, blank=True, null=True) # subclass of Attribute (None or nick) - db_attrype = models.CharField('attrtype', max_length=16, db_index=True, blank=True, null=True) + db_attrtype = models.CharField('attrtype', max_length=16, db_index=True, blank=True, null=True) # time stamp db_date_created = models.DateTimeField('date_created', editable=False, auto_now_add=True) @@ -588,6 +588,7 @@ class TagHandler(object): return [(to_str(p.db_key), to_str(p.db_category)) for p in matches] else: return [to_str(p.db_key) for p in matches] + return [] #return [to_str(p[0]) for p in _GA(self.obj, self._m2m_fieldname).filter(db_category__startswith=self.prefix).values_list("db_key") if p[0]]