Kaynağa Gözat

fix add_option overriding config with default

w-e-w 1 yıl önce
ebeveyn
işleme
93015964c7
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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"""