Merge pull request #278 from adbenitez/adbenitez/fix-bug-in-json_date_parse
fix NameError: name 'x' is not defined in __json_date_parse()
This commit is contained in:
commit
c3cfb197a6
@ -3564,7 +3564,7 @@ class Mastodon:
|
||||
else:
|
||||
json_object[k] = dateutil.parser.parse(v)
|
||||
except:
|
||||
if isinstance(v, str) and len(x.strip()) == 0:
|
||||
if isinstance(v, str) and len(v.strip()) == 0:
|
||||
# Pleroma bug workaround: Empty string becomes start of epoch
|
||||
json_object[k] = datetime.datetime.fromtimestamp(0)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user