diff options
author | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2022-01-29 23:22:54 +0100 |
---|---|---|
committer | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2022-01-29 23:22:54 +0100 |
commit | cabd76663ea295c53d3875292aaf82bcd44b6340 (patch) | |
tree | dfbf0861cd81fd33a3b2ea339bcb5fb38040ed56 /update_db.py | |
parent | a2a1ea822ba731b2de2e4336ab20acaa0f7e8bd4 (diff) | |
download | justice-cabd76663ea295c53d3875292aaf82bcd44b6340.tar.gz |
update trivia section to add list of oldest and longest registered persons
Diffstat (limited to 'update_db.py')
-rw-r--r-- | update_db.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/update_db.py b/update_db.py index d613ed6..8a4e693 100644 --- a/update_db.py +++ b/update_db.py @@ -14,6 +14,9 @@ def update_DB(file, DB_name): continue else: ICO = get_ICO(element) + # Bugfix to skip the old companies that have no Identification No. + if ICO == None: + continue # Vlozit prazdny radek s ICO insert_new_ICO(c, ICO, element) primary_sql_key = get_primary_sql_key(c, ICO) @@ -29,7 +32,7 @@ def get_ICO(element): try: return element.find('ico').text except: - return "00000000" + return None # Function to attempt to insert a placeholder for a new company based on ICO def insert_new_ICO(c, ICO, element): |