Merge pull request #278 from adbenitez/adbenitez/fix-bug-in-json_date_parse

fix NameError: name 'x' is not defined in __json_date_parse()
pull/279/head
Lorenz Diener 2022-11-24 22:11:53 +02:00 zatwierdzone przez GitHub
commit c3cfb197a6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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: