From d92f4dc2e4f82487ecd367d6d070e9736613dcf9 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Sat, 11 May 2024 16:56:08 -0700 Subject: [PATCH] as2.to_as1: handle bare string images --- granary/as2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/granary/as2.py b/granary/as2.py index 42249246..dcb8db18 100644 --- a/granary/as2.py +++ b/granary/as2.py @@ -407,6 +407,8 @@ def all_to_as1(field): images = util.pop_list(obj, 'image') # by convention, first element in AS2 images field is banner/header if type in ACTOR_TYPES and images: + if isinstance(images[0], str): + images[0] = {'url': images[0]} images[0]['objectType'] = 'featured' img_atts = [a for a in attachments