mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:32:45 +08:00
TRIVIAL: do not remove backups in development
This commit is contained in:
parent
8a20d05ba5
commit
054ae8bc13
|
@ -65,6 +65,7 @@ class Backup
|
|||
end
|
||||
|
||||
def self.remove_old
|
||||
return if Rails.env.development?
|
||||
all_backups = Backup.all
|
||||
return unless all_backups.size > SiteSetting.maximum_backups
|
||||
all_backups[SiteSetting.maximum_backups..-1].each(&:remove)
|
||||
|
|
Loading…
Reference in New Issue
Block a user