Skip to content

Commit

Permalink
bcp_gov_uk fix source returning duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
5ila5 committed Dec 2, 2024
1 parent c74fcdf commit da49c7e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def fetch(self):

for bin in json_data:
bin_type = bin["BinType"]
for date_str in [bin["Next"], bin["Subsequent"]]:
date_strs = [bin["Next"]]
if bin["Subsequent"] and bin["Subsequent"] != bin["Next"]:
date_strs.append(bin["Subsequent"])

for date_str in date_strs:
date = (
datetime.strptime(date_str, "%m/%d/%Y %I:%M:%S %p")
+ timedelta(hours=1)
Expand Down

0 comments on commit da49c7e

Please sign in to comment.