Handling and fixing bad dates in JSON input

This commit is contained in:
Philip Sargent
2022-09-20 22:52:31 +03:00
parent 94b49adc4e
commit 71bd07e70e
3 changed files with 49 additions and 14 deletions

View File

@@ -82,12 +82,15 @@ def fillblankpeople(w):
# this isn't working..? why? Because it needs a *ref and an import
wp = w.people()
w.persons = wp
if len(wp) == 1:
# print(f' - {wp=}')
nobody = wp[0].lower()
if nobody == 'unknown' or nobody == 'nobody' or nobody == ' ' or nobody == '':
print(f' - {wp=} {nobody=}')
populatewallet(w)
if not wp:
populatewallet(w)
else:
if len(wp) == 1:
# print(f' - {wp=}')
nobody = wp[0].lower()
if nobody == 'unknown' or nobody == 'nobody' or nobody == ' ' or nobody == '':
print(f' - {wp=} {nobody=}')
populatewallet(w)
def fillblankothers(w):
earliest = datetime.datetime.now().date()