mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
icons as string
This commit is contained in:
parent
727f089044
commit
32fcbccf31
1 changed files with 4 additions and 0 deletions
|
@ -706,6 +706,8 @@ def actor_json_to_model(activity_json, address, server):
|
||||||
icon_entry = activity_json['icon']['url']
|
icon_entry = activity_json['icon']['url']
|
||||||
elif isinstance(activity_json['icon'], list) and 'url' in activity_json['icon'][-1]:
|
elif isinstance(activity_json['icon'], list) and 'url' in activity_json['icon'][-1]:
|
||||||
icon_entry = activity_json['icon'][-1]['url']
|
icon_entry = activity_json['icon'][-1]['url']
|
||||||
|
elif isinstance(activity_json['icon'], str):
|
||||||
|
icon_entry = activity_json['icon']
|
||||||
else:
|
else:
|
||||||
icon_entry = None
|
icon_entry = None
|
||||||
if icon_entry:
|
if icon_entry:
|
||||||
|
@ -778,6 +780,8 @@ def actor_json_to_model(activity_json, address, server):
|
||||||
icon_entry = activity_json['icon']['url']
|
icon_entry = activity_json['icon']['url']
|
||||||
elif isinstance(activity_json['icon'], list) and 'url' in activity_json['icon'][-1]:
|
elif isinstance(activity_json['icon'], list) and 'url' in activity_json['icon'][-1]:
|
||||||
icon_entry = activity_json['icon'][-1]['url']
|
icon_entry = activity_json['icon'][-1]['url']
|
||||||
|
elif isinstance(activity_json['icon'], str):
|
||||||
|
icon_entry = activity_json['icon']
|
||||||
else:
|
else:
|
||||||
icon_entry = None
|
icon_entry = None
|
||||||
if icon_entry:
|
if icon_entry:
|
||||||
|
|
Loading…
Add table
Reference in a new issue