mirror of https://gitlab.com/bashrc2/epicyon
Check type is string
parent
49c609a75a
commit
91c24f224b
|
|
@ -36,6 +36,9 @@ def convert_torrent_to_note(base_dir: str, nickname: str, domain: str,
|
||||||
if not post_json_object.get('type'):
|
if not post_json_object.get('type'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if not isinstance(post_json_object['type'], str):
|
||||||
|
return None
|
||||||
|
|
||||||
if post_json_object['type'] != 'Torrent':
|
if post_json_object['type'] != 'Torrent':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
3
video.py
3
video.py
|
|
@ -36,6 +36,9 @@ def convert_video_to_note(base_dir: str, nickname: str, domain: str,
|
||||||
if not post_json_object.get('type'):
|
if not post_json_object.get('type'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if not isinstance(post_json_object['type'], str):
|
||||||
|
return None
|
||||||
|
|
||||||
if post_json_object['type'] != 'Video':
|
if post_json_object['type'] != 'Video':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue