From 0bb4b0d71dfe14c60f9be38fe574b5f181a32995 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 8 Nov 2023 15:24:47 -0800 Subject: [PATCH] Changes to how images are serialized I'm just going to see if any tests fail? --- bookwyrm/activitypub/person.py | 2 +- bookwyrm/models/fields.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/activitypub/person.py b/bookwyrm/activitypub/person.py index 85cf44409..139d6061d 100644 --- a/bookwyrm/activitypub/person.py +++ b/bookwyrm/activitypub/person.py @@ -35,7 +35,7 @@ class Person(ActivityObject): endpoints: Dict = None name: str = None summary: str = None - icon: Image = field(default_factory=lambda: {}) + icon: Image = None bookwyrmUser: bool = False manuallyApprovesFollowers: str = False discoverable: str = False diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index 1e458c815..6c8a130f8 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -477,7 +477,7 @@ class ImageField(ActivitypubFieldMixin, models.ImageField): if not url: return None - return activitypub.Document(url=url, name=alt) + return activitypub.Image(url=url, name=alt) def field_from_activity(self, value, allow_external_connections=True): image_slug = value