Merge branch 'main' into review-rate

This commit is contained in:
Mouse Reeve
2021-01-04 13:42:39 -08:00
53 changed files with 1175 additions and 398 deletions

View File

@ -118,7 +118,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
activity['attachment'] = [
image_serializer(b.cover, b.alt_text) \
for b in self.mention_books.all()[:4] if b.cover]
if hasattr(self, 'book'):
if hasattr(self, 'book') and self.book.cover:
activity['attachment'].append(
image_serializer(self.book.cover, self.book.alt_text)
)