From ec301051df8cfc1d1f30fdb26d89d9acec5f26e4 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 10 Jul 2022 22:59:45 +0200 Subject: [PATCH] Fix in tag handling --- app/ap_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ap_object.py b/app/ap_object.py index 124f02a..86738cf 100644 --- a/app/ap_object.py +++ b/app/ap_object.py @@ -69,12 +69,12 @@ class Object: @property def tags(self) -> list[ap.RawObject]: - return self.ap_object.get("tag", []) + return ap.as_list(self.ap_object.get("tag", [])) @property def attachments(self) -> list["Attachment"]: attachments = [] - for obj in self.ap_object.get("attachment", []): + for obj in ap.as_list(self.ap_object.get("attachment", [])): proxied_url = proxied_media_url(obj["url"]) attachments.append( Attachment.parse_obj(