From 3165220e828f6f430d170b08d203b449bd9ecce4 Mon Sep 17 00:00:00 2001 From: janek37 <none@none> Date: Thu, 11 Dec 2014 15:49:17 +0100 Subject: [PATCH] poprawki w migracji --- dictionary/migrations/0076_liczba_num.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dictionary/migrations/0076_liczba_num.py b/dictionary/migrations/0076_liczba_num.py index d1aa41c..ac1182a 100644 --- a/dictionary/migrations/0076_liczba_num.py +++ b/dictionary/migrations/0076_liczba_num.py @@ -10,9 +10,6 @@ VALUES = ( ('sg', u'z l.p.'), ('pl', u''), ('sg/pl', u'Też z l.p.'), - ('nota', lambda x: - 'sg/pl' if u'Też z l.p.' in x - else 'sg' if 'z l.p.' in x else 'pl'), ) class Migration(DataMigration): @@ -22,7 +19,7 @@ class Migration(DataMigration): attr = orm.LexemeAttribute.objects.create( name=u'liczba selektywna', closed=True, multiple=False, required=True, takes_gender=False) - attr.parts_of_speech.add(orm.PartOfSpeech.objects.filter(symbol='num')) + attr.parts_of_speech.add(orm.PartOfSpeech.objects.get(symbol='num')) values_cache = {} for val, display_val in VALUES: values_cache[val], created = orm.LexemeAttributeValue.objects.get_or_create( -- libgit2 0.22.2