mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 19:11:09 +00:00
Issue-3187: change variable name and code formatting
This commit is contained in:
parent
d73141792d
commit
8e2649ba3b
2 changed files with 3 additions and 4 deletions
|
@ -41,7 +41,7 @@
|
|||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if annual_summary_year and tab.key == 'home' and has_read_throughs %}
|
||||
{% if annual_summary_year and tab.key == 'home' and has_summary_read_throughs %}
|
||||
<section class="block is-hidden" data-hide="hide_annual_summary_{{ annual_summary_year }}">
|
||||
{% include 'feed/summary_card.html' with year=annual_summary_year %}
|
||||
<hr>
|
||||
|
|
|
@ -54,8 +54,7 @@ class Feed(View):
|
|||
suggestions = suggested_users.get_suggestions(request.user)
|
||||
cutoff = date(get_annual_summary_year(), 12, 31)
|
||||
readthroughs = models.ReadThrough.objects.filter(
|
||||
user=request.user,
|
||||
finish_date__lte=cutoff
|
||||
user=request.user, finish_date__lte=cutoff
|
||||
)
|
||||
|
||||
data = {
|
||||
|
@ -72,7 +71,7 @@ class Feed(View):
|
|||
"path": f"/{tab['key']}",
|
||||
"annual_summary_year": get_annual_summary_year(),
|
||||
"has_tour": True,
|
||||
"has_read_throughs": len(readthroughs) > 0,
|
||||
"has_summary_read_throughs": len(readthroughs),
|
||||
},
|
||||
}
|
||||
return TemplateResponse(request, "feed/feed.html", data)
|
||||
|
|
Loading…
Reference in a new issue