mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
peertube missing descriptions
This commit is contained in:
parent
c37a01fde4
commit
c5208b1afe
1 changed files with 4 additions and 4 deletions
|
@ -481,7 +481,7 @@ def refresh_user_profile_task(user_id):
|
||||||
user.title = activity_json['name']
|
user.title = activity_json['name']
|
||||||
if 'summary' in activity_json:
|
if 'summary' in activity_json:
|
||||||
about_html = activity_json['summary']
|
about_html = activity_json['summary']
|
||||||
if not about_html.startswith('<'): # PeerTube
|
if about_html is not None and not about_html.startswith('<'): # PeerTube
|
||||||
about_html = '<p>' + about_html + '</p>'
|
about_html = '<p>' + about_html + '</p>'
|
||||||
user.about_html = allowlist_html(about_html)
|
user.about_html = allowlist_html(about_html)
|
||||||
else:
|
else:
|
||||||
|
@ -579,7 +579,7 @@ def refresh_community_profile_task(community_id):
|
||||||
else:
|
else:
|
||||||
description_html = ''
|
description_html = ''
|
||||||
|
|
||||||
if description_html != '':
|
if description_html is not None and description_html != '':
|
||||||
if not description_html.startswith('<'): # PeerTube
|
if not description_html.startswith('<'): # PeerTube
|
||||||
description_html = '<p>' + description_html + '</p>'
|
description_html = '<p>' + description_html + '</p>'
|
||||||
community.description_html = allowlist_html(description_html)
|
community.description_html = allowlist_html(description_html)
|
||||||
|
@ -704,7 +704,7 @@ def actor_json_to_model(activity_json, address, server):
|
||||||
|
|
||||||
if 'summary' in activity_json:
|
if 'summary' in activity_json:
|
||||||
about_html = activity_json['summary']
|
about_html = activity_json['summary']
|
||||||
if not about_html.startswith('<'): # PeerTube
|
if about_html is not None and not about_html.startswith('<'): # PeerTube
|
||||||
about_html = '<p>' + about_html + '</p>'
|
about_html = '<p>' + about_html + '</p>'
|
||||||
user.about_html = allowlist_html(about_html)
|
user.about_html = allowlist_html(about_html)
|
||||||
else:
|
else:
|
||||||
|
@ -786,7 +786,7 @@ def actor_json_to_model(activity_json, address, server):
|
||||||
else:
|
else:
|
||||||
description_html = ''
|
description_html = ''
|
||||||
|
|
||||||
if description_html != '':
|
if description_html is not None and description_html != '':
|
||||||
if not description_html.startswith('<'): # PeerTube
|
if not description_html.startswith('<'): # PeerTube
|
||||||
description_html = '<p>' + description_html + '</p>'
|
description_html = '<p>' + description_html + '</p>'
|
||||||
community.description_html = allowlist_html(description_html)
|
community.description_html = allowlist_html(description_html)
|
||||||
|
|
Loading…
Add table
Reference in a new issue