From: Radek Czajka Date: Wed, 5 Jan 2011 13:00:59 +0000 (+0100) Subject: fix buggy sort_key migration X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3e9890945871c9e650a00d2d6beb562944757d80?ds=inline fix buggy sort_key migration --- diff --git a/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py b/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py index b4eac048e..557158ac5 100644 --- a/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py +++ b/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py @@ -12,7 +12,7 @@ class Migration(SchemaMigration): db.alter_column('catalogue_tag', 'sort_key', self.gf('django.db.models.fields.CharField')(max_length=120)) if not db.dry_run: - for tag in orm.Tag.objects.exclude(category=('set', 'author')): + for tag in orm.Tag.objects.exclude(category__in=('set', 'author')): tag.sort_key = tag.name.lower() tag.save() for tag in orm.Tag.objects.filter(category='author'):