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.
|
||||
"""
|
||||
if ('id' in json_object and
|
||||
isinstance(json_object['id'], six.text_type)):
|
||||
try:
|
||||
json_object['id'] = int(json_object['id'])
|
||||
except ValueError:
|
||||
pass
|
||||
for key in ('id', 'in_reply_to_id', 'in_reply_to_account_id'):
|
||||
if (key in json_object and
|
||||
isinstance(json_object[key], six.text_type)):
|
||||
try:
|
||||
json_object[key] = int(json_object[key])
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
return json_object
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència