mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 06:51:27 +08:00
correct emergency regeneration in the controller
This commit is contained in:
@ -12,7 +12,9 @@ class StylesheetCache < ActiveRecord::Base
|
||||
count = StylesheetCache.count
|
||||
if count > MAX_TO_KEEP
|
||||
|
||||
remove_lower = StylesheetCache.limit(MAX_TO_KEEP)
|
||||
remove_lower = StylesheetCache
|
||||
.where(target: target)
|
||||
.limit(MAX_TO_KEEP)
|
||||
.order('id desc')
|
||||
.pluck(:id)
|
||||
.last
|
||||
|
Reference in New Issue
Block a user