Skip to content

Commit

Permalink
Fix wrong total image count if no query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
MaertHaekkinen committed Nov 23, 2024
1 parent 5f039a4 commit 8a6c788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ajapaik/ajapaik/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def _get_filtered_data_for_frontpage(request, album_id=None, page_override=None)
# In some cases it is faster to get number of photos before we annotate new columns to it
albumsize_before_sorting = 0
if not album:
albumsize_before_sorting = Photo.objects.filter(pk__in=photos).cached_count(q)
albumsize_before_sorting = Photo.objects.filter(pk__in=photos).cached_count(str(filter_form.cleaned_data))

# SORTING BELOW THIS LINE

Expand Down

0 comments on commit 8a6c788

Please sign in to comment.