Demographics page: count only 'gallery' photos
The photo stats were counting ALL public photos of certified members, whether featured on the Site Gallery or not. Update the query to filter for Site Gallery photos instead.
This commit is contained in:
parent
106bcd377e
commit
c8d9cdbb3a
|
@ -278,6 +278,7 @@ func PhotoStatistics() Photo {
|
|||
photos
|
||||
JOIN users ON (photos.user_id = users.id)
|
||||
WHERE photos.visibility = 'public'
|
||||
AND photos.gallery IS TRUE
|
||||
AND users.certified IS TRUE
|
||||
AND users.status = 'active'
|
||||
GROUP BY photos.explicit
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
{{range .Demographic.People.IterOrientations}}
|
||||
<div class="columns">
|
||||
<div class="column is-3">
|
||||
<strong>{{or .Label "(No answer)"}}</strong>
|
||||
<strong>{{or .Label "No answer"}}</strong>
|
||||
<small class="has-text-grey">({{FormatNumberCommas .Count}})</small>
|
||||
</div>
|
||||
<div class="column pt-4">
|
||||
|
|
Loading…
Reference in New Issue
Block a user