Fixed selection criterion for newest upload

This commit is contained in:
Christoph Haas 2021-02-20 16:41:41 +01:00
parent afe6f7ed7f
commit ecbc30cb6e

View file

@ -91,7 +91,7 @@ class Screenshot < ApplicationRecord
# Get the newest screenshot regardless of the package it belongs to
def self.newest_upload
self.order(updated_at: :desc).where(approved: true).first
self.order(created_at: :desc).where(approved: true).first
end
# Returns true if the current user has administrative permissions