mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
e69beba537
commit
6f58f1d19e
21
posts.py
21
posts.py
|
@ -1072,6 +1072,7 @@ def _create_post_cw_from_reply(base_dir: str, nickname: str, domain: str,
|
||||||
"""If this is a reply and the original post has a CW
|
"""If this is a reply and the original post has a CW
|
||||||
then use the same CW
|
then use the same CW
|
||||||
"""
|
"""
|
||||||
|
reply_to_json = None
|
||||||
if in_reply_to and not sensitive:
|
if in_reply_to and not sensitive:
|
||||||
# locate the post which this is a reply to and check if
|
# locate the post which this is a reply to and check if
|
||||||
# it has a content warning. If it does then reproduce
|
# it has a content warning. If it does then reproduce
|
||||||
|
@ -1080,16 +1081,16 @@ def _create_post_cw_from_reply(base_dir: str, nickname: str, domain: str,
|
||||||
locate_post(base_dir, nickname, domain, in_reply_to)
|
locate_post(base_dir, nickname, domain, in_reply_to)
|
||||||
if reply_post_filename:
|
if reply_post_filename:
|
||||||
reply_to_json = load_json(reply_post_filename)
|
reply_to_json = load_json(reply_post_filename)
|
||||||
if reply_to_json:
|
if reply_to_json:
|
||||||
if reply_to_json.get('object'):
|
if reply_to_json.get('object'):
|
||||||
if reply_to_json['object'].get('sensitive'):
|
if reply_to_json['object'].get('sensitive'):
|
||||||
if reply_to_json['object']['sensitive']:
|
if reply_to_json['object']['sensitive']:
|
||||||
sensitive = True
|
sensitive = True
|
||||||
if reply_to_json['object'].get('summary'):
|
if reply_to_json['object'].get('summary'):
|
||||||
summary = \
|
summary = \
|
||||||
get_summary_from_post(reply_to_json,
|
get_summary_from_post(reply_to_json,
|
||||||
system_language,
|
system_language,
|
||||||
languages_understood)
|
languages_understood)
|
||||||
|
|
||||||
return sensitive, summary
|
return sensitive, summary
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue