From 2174ea11ececa262e62fc141d8655120a6daff93 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 2 Apr 2021 07:33:36 -0700 Subject: [PATCH] Makes user to_activity serializer args consistent --- bookwyrm/models/user.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bookwyrm/models/user.py b/bookwyrm/models/user.py index 5ef0934c..f951ee45 100644 --- a/bookwyrm/models/user.py +++ b/bookwyrm/models/user.py @@ -182,10 +182,10 @@ class User(OrderedCollectionPageMixin, AbstractUser): **kwargs ) - def to_activity(self): + def to_activity(self, **kwargs): """override default AP serializer to add context object idk if this is the best way to go about this""" - activity_object = super().to_activity() + activity_object = super().to_activity(**kwargs) activity_object["@context"] = [ "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", @@ -293,10 +293,10 @@ class KeyPair(ActivitypubMixin, BookWyrmModel): self.private_key, self.public_key = create_key_pair() return super().save(*args, **kwargs) - def to_activity(self): + def to_activity(self, **kwargs): """override default AP serializer to add context object idk if this is the best way to go about this""" - activity_object = super().to_activity() + activity_object = super().to_activity(**kwargs) del activity_object["@context"] del activity_object["type"] return activity_object