Commit 3165220e828f6f430d170b08d203b449bd9ecce4
1 parent
7d6076ee
poprawki w migracji
Showing
1 changed file
with
1 additions
and
4 deletions
dictionary/migrations/0076_liczba_num.py
@@ -10,9 +10,6 @@ VALUES = ( | @@ -10,9 +10,6 @@ VALUES = ( | ||
10 | ('sg', u'z l.p.'), | 10 | ('sg', u'z l.p.'), |
11 | ('pl', u''), | 11 | ('pl', u''), |
12 | ('sg/pl', u'Też z l.p.'), | 12 | ('sg/pl', u'Też z l.p.'), |
13 | - ('nota', lambda x: | ||
14 | - 'sg/pl' if u'Też z l.p.' in x | ||
15 | - else 'sg' if 'z l.p.' in x else 'pl'), | ||
16 | ) | 13 | ) |
17 | 14 | ||
18 | class Migration(DataMigration): | 15 | class Migration(DataMigration): |
@@ -22,7 +19,7 @@ class Migration(DataMigration): | @@ -22,7 +19,7 @@ class Migration(DataMigration): | ||
22 | attr = orm.LexemeAttribute.objects.create( | 19 | attr = orm.LexemeAttribute.objects.create( |
23 | name=u'liczba selektywna', closed=True, multiple=False, | 20 | name=u'liczba selektywna', closed=True, multiple=False, |
24 | required=True, takes_gender=False) | 21 | required=True, takes_gender=False) |
25 | - attr.parts_of_speech.add(orm.PartOfSpeech.objects.filter(symbol='num')) | 22 | + attr.parts_of_speech.add(orm.PartOfSpeech.objects.get(symbol='num')) |
26 | values_cache = {} | 23 | values_cache = {} |
27 | for val, display_val in VALUES: | 24 | for val, display_val in VALUES: |
28 | values_cache[val], created = orm.LexemeAttributeValue.objects.get_or_create( | 25 | values_cache[val], created = orm.LexemeAttributeValue.objects.get_or_create( |