From 7204068d2ae60004ae9e8322bd4857f3ea129f23 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 9 Dec 2020 13:35:36 -0800 Subject: [PATCH] Removes unnecessary override of field_from_activity on foreign key --- bookwyrm/models/fields.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index fae3cb57..fb94e1a6 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -126,14 +126,6 @@ class ForeignKey(ActivitypubRelatedFieldMixin, models.ForeignKey): return None return value.remote_id - def field_from_activity(self, value): - try: - validate_remote_id(value) - except ValidationError: - return None - return activitypub.resolve_remote_id(self.related_model, value) - - class OneToOneField(ActivitypubRelatedFieldMixin, models.OneToOneField): ''' activitypub-aware foreign key field '''