Skip to content

Commit

Permalink
Fix the results count #138
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jul 17, 2024
1 parent a684f70 commit 984ecdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</li>
<li class="nav-item">
<div class="h6 mt-2 mb-0 smaller">
{% if page_obj.paginator.count != inventory_count %}
{% if page_obj.paginator.count != total_count %}
{{ page_obj.paginator.count|intcomma }} of
<a href="?all=true#inventory">{{ inventory_count|intcomma }} results</a>
<a href="?all=true#inventory">{{ total_count }} results</a>
{% else %}
{{ page_obj.paginator.count|intcomma }} results
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions product_portfolio/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ def get_context_data(self, **kwargs):
{
"filter_dependency": filter_dependency,
"page_obj": page_obj,
"total_count": self.object.dependencies.count(),
"search_query": self.request.GET.get("dependencies-q", ""),
}
)
Expand Down

0 comments on commit 984ecdd

Please sign in to comment.