Skip to content

Commit

Permalink
Revert "config: save booleans in lower case so stay compatible with o…
Browse files Browse the repository at this point in the history
…lder images"

This reverts commit c499110.
  • Loading branch information
Littlesat committed Dec 24, 2024
1 parent c499110 commit 8c33eab
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/python/Components/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,6 @@ def trueValues(self):
# This should be set in the __init__() but has been done this way as a workaround for a stupid broken plugin that fails to call ConfigBoolean.__init__().
return ("1", "enable", "on", "true", "yes")

# you need to override this if str(self.value) doesn't work
def save(self):
print(self.saved_value, self.value, self.default, self.last_value)
if self.save_disabled or (self.value == self.default and not self.save_forced):
self.saved_value = None
else:
#ensure saved value is in lower case to keep backwards compatible with previous OpenPLi images
self.saved_value = self.tostring(self.value).lower()

if self.last_value != self.tostring(self.value):
self.last_value = self.tostring(self.value)
self.changedFinal()

def isChanged(self):
#Make booleans checks with saved value non case sensitive
sv = self.saved_value or self.tostring(self.default)
Expand Down

0 comments on commit 8c33eab

Please sign in to comment.