From 948e938040bd2dfa0aadb7959a2ab717b7553a89 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 15 Dec 2020 18:16:33 -0800 Subject: [PATCH] Handles outdated Add with Book type should be edition. --- bookwyrm/models/fields.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index b8efc71d0..5e12f5d56 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -283,6 +283,8 @@ class TagField(ManyToManyField): for link_json in value: link = activitypub.Link(**link_json) tag_type = link.type if link.type != 'Mention' else 'Person' + if tag_type == 'Book': + tag_type = 'Edition' if tag_type != self.related_model.activity_serializer.type: # tags can contain multiple types continue