mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
correct emergency regeneration in the controller
This commit is contained in:
parent
2625c3bb9a
commit
0f53fc8328
3 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue