|
@ -160,16 +160,18 @@ def check_organizator(): |
|
|
for o,n in res: |
|
|
for o,n in res: |
|
|
check_same(o,n,old_fields, new_fields) |
|
|
check_same(o,n,old_fields, new_fields) |
|
|
# organizuje od, do: |
|
|
# organizuje od, do: |
|
|
print(list(o.keys()),list(n.keys())) |
|
|
if o['organizuje_do_roku'] is None and n['organizuje_do'] is None: |
|
|
if o['organizuje_od_roku'] != n['organizuje_od'].year: |
|
|
pass |
|
|
|
|
|
elif o['organizuje_od_roku'] != n['organizuje_od'].year: |
|
|
raise ValueError(f'Not matching organizuje_od for org id={o["id"]}: old {o["organizuje_od_roku"]}, new {n["organizuje_od"]}') |
|
|
raise ValueError(f'Not matching organizuje_od for org id={o["id"]}: old {o["organizuje_od_roku"]}, new {n["organizuje_od"]}') |
|
|
if o['organizuje_do_roku'] != n['organizuje_do'].year: |
|
|
if o['organizuje_do_roku'] is None and n['organizuje_do'] is None: |
|
|
|
|
|
pass |
|
|
|
|
|
elif o['organizuje_do_roku'] != n['organizuje_do'].year: |
|
|
raise ValueError(f'Not matching organizuje_do for org id={o["id"]}: old {o["organizuje_do_roku"]}, new {n["organizuje_do"]}') |
|
|
raise ValueError(f'Not matching organizuje_do for org id={o["id"]}: old {o["organizuje_do_roku"]}, new {n["organizuje_do"]}') |
|
|
if o['prezdivka'] == n['o_prezdivka']: |
|
|
if o['prezdivka'] == n['o_prezdivka']: |
|
|
continue |
|
|
continue |
|
|
if o['prezdivka'] is None and n['o_prezdivka'] == '': |
|
|
if o['prezdivka'] is None and n['o_prezdivka'] == '': |
|
|
continue |
|
|
continue |
|
|
print(o,n) |
|
|
|
|
|
raise ValueError(f'Not matching prezdivka for org id={o["id"]}: old {o["prezdivka"]}, new {n["o_prezdivka"]}') |
|
|
raise ValueError(f'Not matching prezdivka for org id={o["id"]}: old {o["prezdivka"]}, new {n["o_prezdivka"]}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|