Skip to content

Commit

Permalink
Calculate num_photos more consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed May 24, 2023
1 parent fe492eb commit 75036ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/api_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def get_search_term_examples(user):


def get_count_stats(user):
num_photos = Photo.visible.filter(Q(owner=user)).count()
num_photos = Photo.visible.filter(Q(owner=user)).distinct().count()
num_missing_photos = Photo.objects.filter(
Q(owner=user) & Q(files=None) | Q(main_file=None)
).count()
Expand Down

0 comments on commit 75036ec

Please sign in to comment.