fix string id support to also include in_reply_to_... fields
This commit is contained in:
pare
ca11ef77ac
commit
b9e6a1e9ba
S'han modificat 1 arxius amb 7 adicions i 6 eliminacions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Referencia en una nova incidència