Skip to content

Commit

Permalink
Merge pull request #278 from adbenitez/adbenitez/fix-bug-in-json_date…
Browse files Browse the repository at this point in the history
…_parse

fix NameError: name 'x' is not defined in __json_date_parse()
  • Loading branch information
halcy committed Nov 24, 2022
2 parents 617c30a + 649b6ca commit c3cfb19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mastodon/Mastodon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3564,7 +3564,7 @@ def __json_date_parse(json_object):
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:
Expand Down

0 comments on commit c3cfb19

Please sign in to comment.