aboutsummaryrefslogtreecommitdiffstats
path: root/update_db.py
diff options
context:
space:
mode:
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)