fix string id support to also include in_reply_to_... fields

This commit is contained in:
codl 2017-11-26 22:49:32 +01:00
pare ca11ef77ac
commit b9e6a1e9ba
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 6CD7C8891ED1233A

Veure arxiu

@ -1084,12 +1084,13 @@ class Mastodon:
""" """
Converts json string IDs to native python bignums. Converts json string IDs to native python bignums.
""" """
if ('id' in json_object and for key in ('id', 'in_reply_to_id', 'in_reply_to_account_id'):
isinstance(json_object['id'], six.text_type)): if (key in json_object and
try: isinstance(json_object[key], six.text_type)):
json_object['id'] = int(json_object['id']) try:
except ValueError: json_object[key] = int(json_object[key])
pass except ValueError:
pass
return json_object return json_object