Removes unnecessary override of field_from_activity on foreign key

This commit is contained in:
Mouse Reeve 2020-12-09 13:35:36 -08:00
parent 6b9db97ab8
commit 7204068d2a

View file

@ -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 '''