mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-14 03:05:39 +00:00
Clearer syntax
This commit is contained in:
parent
9815e9e100
commit
d61595abb9
1 changed files with 2 additions and 3 deletions
|
@ -189,10 +189,9 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||||
if hasattr(activity, "name"):
|
if hasattr(activity, "name"):
|
||||||
activity.name = self.pure_name
|
activity.name = self.pure_name
|
||||||
activity.type = self.pure_type
|
activity.type = self.pure_type
|
||||||
|
books = [getattr(self, "book", None)] + list(self.mention_books.all())
|
||||||
covers = [
|
covers = [
|
||||||
b.to_activity().get("cover")
|
b.to_activity().get("cover") for b in books if b
|
||||||
for b in [getattr(self, "book", None)] + list(self.mention_books.all())
|
|
||||||
if b
|
|
||||||
]
|
]
|
||||||
activity.attachment = covers
|
activity.attachment = covers
|
||||||
return activity
|
return activity
|
||||||
|
|
Loading…
Reference in a new issue