fix NameError: name 'x' is not defined in __json_date_parse()

This commit is contained in:
adbenitez 2022-11-24 14:53:36 -05:00
parent 5d7ca19c30
commit 649b6cabe0

View File

@ -3569,7 +3569,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: