From f9d77560e3ee5665d76ad44d7c38ccc646caab4a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 11 Nov 2024 10:37:55 +0000 Subject: [PATCH] Use language specific content when possible --- utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.py b/utils.py index de55afd78..ad931d55e 100644 --- a/utils.py +++ b/utils.py @@ -598,6 +598,10 @@ def get_base_content_from_post(post_json_object: {}, this_post_json = post_json_object if has_object_dict(post_json_object): this_post_json = post_json_object['object'] + if 'contentMap' in this_post_json: + if isinstance(this_post_json['contentMap'], dict): + if this_post_json['contentMap'].get(system_language): + return this_post_json['contentMap'][system_language] if 'content' not in this_post_json: return '' return this_post_json['content']