Skip to content

Commit

Permalink
[udhpsh] data za rok 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
kokes committed Jul 1, 2022
1 parent 5669ed1 commit c881170
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/udhpsh/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"2018": "https://zpravy.udhpsh.cz/zpravy/vfz2018.json",
"2019": "https://zpravy.udhpsh.cz/zpravy/vfz2019.json",
"2020": "https://zpravy.udhpsh.cz/zpravy/vfz2020.json",
"2021": "https://zpravy.udhpsh.cz/zpravy/vfz2021.json",
}
years = sorted(indices.keys())

Expand Down Expand Up @@ -63,8 +64,9 @@ def main(outdir: str, partial: bool = False):
urlopen(relfile, timeout=HTTP_TIMEOUT)
):
row = {mapping[k]: v for k, v in item.items()}
if row.get("ico_darce") is not None and not isinstance(
row["ico_darce"], int
if row.get("ico_darce") is not None and (
not isinstance(row["ico_darce"], int)
or row["ico_darce"] > 99999999
):
print(f"preskakuju zaznam s neplatnym ICO: {row}")
row["ico_darce"] = None
Expand Down

0 comments on commit c881170

Please sign in to comment.