Add quotes for empty default value

This commit is contained in:
Peter Vilim 2015-01-19 13:17:17 -06:00
parent ddc4e7b309
commit c30978be2f

View File

@ -116,8 +116,10 @@ class SettingValueCompletionModel(base.BaseCompletionModel):
value = '""' value = '""'
self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value, self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value,
"Current value") "Current value")
self.new_item(cur_cat, configdata.DATA[section][option].default(), default_value = configdata.DATA[section][option].default()
"Default value") if not default_value:
default_value = '""'
self.new_item(cur_cat, default_value, "Default value")
if hasattr(configdata.DATA[section], 'valtype'): if hasattr(configdata.DATA[section], 'valtype'):
# Same type for all values (ValueList) # Same type for all values (ValueList)
vals = configdata.DATA[section].valtype.complete() vals = configdata.DATA[section].valtype.complete()