Przeglądaj źródła

Merge pull request #13213 from AUTOMATIC1111/fix-add_option-overriding-config-with-default

Fix major issue add_option overriding config with default
AUTOMATIC1111 1 rok temu
rodzic
commit
102b6617da
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      modules/options.py

+ 2 - 1
modules/options.py

@@ -210,7 +210,8 @@ class Options:
 
     def add_option(self, key, info):
         self.data_labels[key] = info
-        self.data[key] = info.default
+        if key not in self.data:
+            self.data[key] = info.default
 
     def reorder(self):
         """reorder settings so that all items related to section always go together"""