Fix settings not allowing to delete values not in defaults anymore

This commit is contained in:
Gina Häußge 2017-01-19 12:31:08 +01:00
parent caa84d7918
commit 6268e27dd7

View file

@ -1396,13 +1396,18 @@ class Settings(object):
try:
current = chain.get_by_path(path)
except KeyError:
current = None
try:
default_value = chain.get_by_path(path, only_defaults=True)
in_local = chain.has_path(path, only_local=True)
in_defaults = chain.has_path(path, only_defaults=True)
except KeyError:
if error_on_path:
raise NoSuchSettingsPath()
return
default_value = None
in_local = chain.has_path(path, only_local=True)
in_defaults = chain.has_path(path, only_defaults=True)
if not force and in_defaults and in_local and default_value == value:
try: