mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
Fixes null value in status attachment array
This commit is contained in:
parent
5c1884d22d
commit
d8eb3454d6
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||||
activity['attachment'] = [
|
activity['attachment'] = [
|
||||||
image_serializer(b.cover, b.alt_text) \
|
image_serializer(b.cover, b.alt_text) \
|
||||||
for b in self.mention_books.all()[:4] if b.cover]
|
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(
|
activity['attachment'].append(
|
||||||
image_serializer(self.book.cover, self.book.alt_text)
|
image_serializer(self.book.cover, self.book.alt_text)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue