diff --git a/resspublica/bernAsianHornet.py b/resspublica/bernAsianHornet.py index 206b2a4..4abb7e3 100644 --- a/resspublica/bernAsianHornet.py +++ b/resspublica/bernAsianHornet.py @@ -138,7 +138,7 @@ def generateBernAsianHornetFeed(ASSETS, CACHE): for start, end in weeklyRangesFrom(arbitraryStartDate): # arbitrary start date weeklyEntry = {} - weeklyEntry["id"] = datetime.combine(start, time(12, 0)).timestamp() # we use epoch time as the id + weeklyEntry["id"] = f"asian-hornets-bern-{start.isoformat()}-{end.isoformat()}" # we use epoch time as the id EDIT: NO THIS BROKE MULTIPLE TIMES MAKING SOME ID CHANGES. WE CHANGE THAT weeklyEntry["creationDate"] = end.isoformat() weeklyEntry["date"] = end.isoformat() # there is no point of updating it later, as (I think) data isn't retroactively put weeklyEntry["source"] = "opendata.swiss" diff --git a/resspublica/bernReligionMap.py b/resspublica/bernReligionMap.py index 012d207..a873e1f 100644 --- a/resspublica/bernReligionMap.py +++ b/resspublica/bernReligionMap.py @@ -271,7 +271,7 @@ def generateBernReligionMap(ASSETS, CACHE): } for start, end in trimesterRangesFrom(arbitraryStartDate): trimestrialEntry = {} - trimestrialEntry["id"] = datetime.combine(start, time(12, 0)).timestamp() # we use timestamp as ids + trimestrialEntry["id"] = f"religion-map-bern-{start.isoformat()}-{end.isoformat()}" # timestamps from epoch are unreliable trimestrialEntry["creationDate"] = start.isoformat() trimestrialEntry["date"] = start.isoformat() # there is no point have them different. On other feeds it's used for update date trimestrialEntry["source"] = "opendata.swiss"