Updates to_model to use fields
This commit is contained in:
parent
1610d81ce6
commit
a85043b351
7 changed files with 78 additions and 66 deletions
|
@ -80,7 +80,9 @@ class ActivitypubMixin:
|
|||
activity[key] += value
|
||||
else:
|
||||
activity[key] = value
|
||||
|
||||
if hasattr(self, 'serialize_reverse_fields'):
|
||||
# for example, editions of a work
|
||||
for field_name in self.serialize_reverse_fields:
|
||||
related_field = getattr(self, field_name)
|
||||
activity[field_name] = unfurl_related_field(related_field)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue