mirror of https://gitlab.com/bashrc2/epicyon
Check field types
parent
1b5143f4da
commit
63083b1a1f
4
utils.py
4
utils.py
|
@ -4146,8 +4146,12 @@ def is_quote_toot(post_json_object: str) -> bool:
|
||||||
continue
|
continue
|
||||||
if not item.get('mediaType'):
|
if not item.get('mediaType'):
|
||||||
continue
|
continue
|
||||||
|
if not isinstance(item['type'], str):
|
||||||
|
continue
|
||||||
if item['type'] != 'Link':
|
if item['type'] != 'Link':
|
||||||
continue
|
continue
|
||||||
|
if not isinstance(item['mediaType'], str):
|
||||||
|
continue
|
||||||
if 'json' not in item['mediaType']:
|
if 'json' not in item['mediaType']:
|
||||||
continue
|
continue
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue