Commit 167c4b3e8dd8335ce00e6db4f3b5dfdd065ace6f
1 parent
7d85cc0a
jeszcze poprawka do typu nazwy
Showing
1 changed file
with
4 additions
and
1 deletions
dictionary/management/commands/import_data.py
... | ... | @@ -414,7 +414,10 @@ class ImportData(object): |
414 | 414 | for row in result: |
415 | 415 | slownik = row['slownik'] |
416 | 416 | status = 'conf' if slownik != 'zmiotki' else 'cand' |
417 | - comms = row['typnazwy'].split(' a. ') or [row['pospolitosc']] | |
417 | + if row['typnazwy']: | |
418 | + comms = row['typnazwy'].split(' a. ') | |
419 | + else: | |
420 | + comms = [row['pospolitosc']] | |
418 | 421 | cvs = [ |
419 | 422 | cv_table.get(COMMONNESS_TRANSLATION.get(comm, comm)) |
420 | 423 | for comm in comms if comm] |
... | ... |