aboutsummaryrefslogtreecommitdiffstats
path: root/update_db.py
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-04-11 22:03:10 +0200
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-04-11 22:03:10 +0200
commit8e8f91be5f5c3089255630f64b7be440a91994f6 (patch)
treebb5f97b7df5213d5cdc0a253ba54cf1132479e16 /update_db.py
parent0279c2c4edbeea14a801271e273078a21b5b9fd6 (diff)
downloadjustice-8e8f91be5f5c3089255630f64b7be440a91994f6.tar.gz
Some more minor tweaks
Diffstat (limited to 'update_db.py')
-rw-r--r--update_db.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/update_db.py b/update_db.py
index 04dd9a4..90e66cc 100644
--- a/update_db.py
+++ b/update_db.py
@@ -501,6 +501,12 @@ def find_clen_statut_org(c, ICO, elem, conn, relationship_table_key, element):
osoba_id = find_fyzicka_osoba(c, ICO, elem, conn, relationship_table_key, element)
adresa_id = sidlo3(c, elem, relationship_table_key)
c.execute("INSERT into statutarni_organ_clen_relation (statutarni_organ_id, osoba_id, adresa_id, zapis_datum, vymaz_datum, funkce_od, funkce_do, clenstvi_od, clenstvi_do, funkce) VALUES (?,?,?,?,?,?,?,?,?,?)", (relationship_table_key, osoba_id, adresa_id, zapis_datum, vymaz_datum, funkceOd, funkceDo, clenstviOd, clenstviDo, funkce_statutar_organu,))
+ if typ_osoby == "AngazmaPravnicke":
+ spol_ico = str(get_prop(elem, "osoba/ico"))
+ regCislo = str(get_prop(elem, "osoba/regCislo"))
+ prav_osoba_id = find_pravnicka_osoba(c, elem, spol_ico, regCislo)
+ adresa_id = sidlo3(c, elem, relationship_table_key)
+ c.execute("INSERT into statutarni_organ_clen_relation (statutarni_organ_id, prav_osoba_id, adresa_id, zapis_datum, vymaz_datum, funkce_od, funkce_do, clenstvi_od, clenstvi_do, funkce) VALUES (?,?,?,?,?,?,?,?,?,?)", (relationship_table_key, prav_osoba_id, adresa_id, zapis_datum, vymaz_datum, funkceOd, funkceDo, clenstviOd, clenstviDo, funkce_statutar_organu,))
except Exception as f:
print(f)