Starts getting reverse fields working for deserialization

also fixes the fields on the image model and runs a long overdue
migration
This commit is contained in:
Mouse Reeve
2020-12-07 18:28:42 -08:00
parent d0c1a68df6
commit 4d4ee8b8c3
8 changed files with 434 additions and 59 deletions

View File

@ -166,7 +166,7 @@ class KeyPair(ActivitypubMixin, BookWyrmModel):
blank=True, null=True, activitypub_field='publicKeyPem')
activity_serializer = activitypub.PublicKey
serialize_reverse_fields = ['owner']
serialize_reverse_fields = [('owner', 'owner')]
def get_remote_id(self):
# self.owner is set by the OneToOneField on User