Merge branch 'master' of salsa.debian.org:debian/debshots

This commit is contained in:
Christoph Haas 2020-04-20 20:29:06 +02:00
commit 33086f9430
12 changed files with 132 additions and 52 deletions

View file

@ -52,12 +52,6 @@ class Package < ApplicationRecord
where.not(id: subselect)
end
# Packages that need screenshots and have most visits.
# These packages are most likely to need a screenshot.
def self.without_screenshots_most_visits
self.without_screenshots.order(visits: :desc)
end
# Return a query of all approved/public screenshots of this package
def screenshots_approved
self.screenshots.where(approved: true)