Commit 3165220e828f6f430d170b08d203b449bd9ecce4

Authored by janek37
1 parent 7d6076ee

poprawki w migracji

dictionary/migrations/0076_liczba_num.py
... ... @@ -10,9 +10,6 @@ VALUES = (
10 10 ('sg', u'z l.p.'),
11 11 ('pl', u''),
12 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 15 class Migration(DataMigration):
... ... @@ -22,7 +19,7 @@ class Migration(DataMigration):
22 19 attr = orm.LexemeAttribute.objects.create(
23 20 name=u'liczba selektywna', closed=True, multiple=False,
24 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 23 values_cache = {}
27 24 for val, display_val in VALUES:
28 25 values_cache[val], created = orm.LexemeAttributeValue.objects.get_or_create(
... ...