From c3588b347e9c3e73a09294ea4e68af564572db81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sun, 12 May 2024 14:37:36 +0800 Subject: [PATCH] Fix bug. --- app/models/file_manager_setting.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/file_manager_setting.rb b/app/models/file_manager_setting.rb index 2b7a4ad..dac6926 100644 --- a/app/models/file_manager_setting.rb +++ b/app/models/file_manager_setting.rb @@ -231,6 +231,9 @@ class FileManagerSetting self.modules_saved_info = models_dict self.modules_keys = modules_info.keys self.save + if self.class.all.count > 1 + self.class.where(:id.ne=> self.id).destroy + end modules_info.each do |module_key, uploaders| # module_app = ModuleApp.where(:key=> module_key).first # I18n.t("module_name.#{module_key}")