1
0
Fork 0

Incoming shelve activities

This commit is contained in:
Mouse Reeve 2020-11-02 15:10:41 -08:00
parent 4cfded3d19
commit 5501318f95
3 changed files with 24 additions and 3 deletions

View file

@ -68,7 +68,10 @@ class ActivitypubMixin:
if not hasattr(self, mapping.model_key) or not mapping.activity_key:
continue
value = getattr(self, mapping.model_key)
if hasattr(value, 'remote_id'):
print(value)
if hasattr(value, 'local_id'):
value = value.local_id
elif hasattr(value, 'remote_id'):
value = value.remote_id
if isinstance(value, datetime):
value = value.isoformat()