mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-10 22:14:35 -04:00
TRIVIAL: do not remove backups in development
This commit is contained in:
parent
8a20d05ba5
commit
054ae8bc13
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue