handle dates in passed data on reporting errors
json.dumps fails on date objects
This commit is contained in:
parent
e7f67cbe8f
commit
63ec84e9b2
@ -90,7 +90,7 @@ def load_data_into_database(cursor, data):
|
||||
print()
|
||||
print(e)
|
||||
print()
|
||||
print(json.dumps(entry, indent = 4))
|
||||
show_dictionary(entry)
|
||||
raise e
|
||||
|
||||
def date_in_future(date):
|
||||
@ -175,6 +175,10 @@ def insert_entry(cursor, e):
|
||||
e["uprn"])
|
||||
)
|
||||
|
||||
def show_dictionary(data):
|
||||
for key in data.keys():
|
||||
print(key, "=", data[key])
|
||||
|
||||
def days_since(date, now):
|
||||
if(date == None):
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user