diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/label/label/core.py index 4d63a7624..18224ed64 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -147,13 +147,21 @@ class Core(CorePluginBase): del self.torrent_labels[torrent_id] def clean_initial_config(self): - "add any new keys in OPTIONS_DEFAULTS" + """ + *add any new keys in OPTIONS_DEFAULTS + *set all None values to default <-fix development config + """ log.debug(self.labels.keys()) for key in self.labels.keys(): options = dict(OPTIONS_DEFAULTS) options.update(self.labels[key]) self.labels[key] = options + for key, value in self.labels[key].iteritems(): + if value == None: + self.labels[key] = OPTIONS_DEFAULTS[key] + + def save_config(self): self.clean_config() self.config.save() diff --git a/deluge/plugins/label/label/template/options.html b/deluge/plugins/label/label/template/options.html index 8ea17325a..e55bb60f9 100644 --- a/deluge/plugins/label/label/template/options.html +++ b/deluge/plugins/label/label/template/options.html @@ -1,9 +1,8 @@ -$def with (label_id, options_form) +$def with (label_id, options_form, error=None) $:render.basic_header(_("Label Options"))