From cd9efe8cbf283369aff8041d913a427a4d3692ef Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 19 Feb 2020 19:03:50 -0800 Subject: [PATCH] Handle alternate OL data format Fixes #52 --- fedireads/templatetags/fr_display.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fedireads/templatetags/fr_display.py b/fedireads/templatetags/fr_display.py index 51819209..19c2a83a 100644 --- a/fedireads/templatetags/fr_display.py +++ b/fedireads/templatetags/fr_display.py @@ -30,5 +30,7 @@ def description_format(description): @register.filter(name='author_bio') def bio_format(bio): ''' clean up OL author bios ''' + if isinstance(bio, dict) and 'value' in bio: + bio = bio['value'] bio = bio.split('\n') return bio[0].strip()