Fix date parsing failing due to missing field for int parsing

This commit is contained in:
Lorenz Diener 2019-05-11 12:57:01 +02:00
pare cc2089795f
commit c442af7715

Veure arxiu

@ -2579,7 +2579,7 @@ class Mastodon:
"""
Converts json string numerals to native python bignums.
"""
for key in ('id', 'week', 'in_reply_to_id', 'in_reply_to_account_id', 'logins', 'registrations', 'statuses'):
for key in ('id', 'week', 'in_reply_to_id', 'in_reply_to_account_id', 'logins', 'registrations', 'statuses', 'day'):
if (key in json_object and isinstance(json_object[key], six.text_type)):
try:
json_object[key] = int(json_object[key])