forked from mirrors/bookwyrm
Removes unnecessary override of field_from_activity on foreign key
This commit is contained in:
parent
6b9db97ab8
commit
7204068d2a
1 changed files with 0 additions and 8 deletions
|
@ -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 '''
|
||||
|
|
Loading…
Reference in a new issue