Unknown map

merge-requests/30/head
Bob Mottram 2023-10-11 22:16:27 +01:00
parent f29621d8c1
commit 7c2e310d22
1 changed files with 14 additions and 11 deletions

View File

@ -4538,6 +4538,7 @@ def harmless_markup(post_json_object: {}) -> None:
'pre')
map_name = field_name + 'Map'
if post_json_object['object'].get(map_name):
if isinstance(post_json_object['object'][map_name], dict):
map_dict = post_json_object['object'][map_name].items()
for lang, content in map_dict:
if not isinstance(content, str):
@ -4549,7 +4550,9 @@ def harmless_markup(post_json_object: {}) -> None:
content = post_json_object['object'][map_name][lang]
post_json_object['object'][map_name][lang] = \
remove_markup_tag(content, 'pre')
else:
print('WARN: harmless_markup unkown Map ' + map_name + ' ' +
str(post_json_object['object'][map_name]))
def ap_proxy_type(json_object: {}) -> str:
"""Returns a string indicating the proxy for an activitypub post