Fixes attribution field logic

This commit is contained in:
Mouse Reeve 2021-08-29 08:50:46 -07:00
parent 8c8b1168d4
commit 082c2708a7

View file

@ -228,7 +228,7 @@ class PrivacyField(ActivitypubFieldMixin, models.CharField):
# we need to figure out who this is to get their followers link # we need to figure out who this is to get their followers link
for field in ["attributedTo", "owner", "actor"]: for field in ["attributedTo", "owner", "actor"]:
if hasattr(data, field): if hasattr(data, field):
user_field = getattr(data, field) user_field = field
break break
if not user_field: if not user_field:
raise ValidationError("No user field found for privacy", data) raise ValidationError("No user field found for privacy", data)