mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-01-23 08:40:21 +01:00
implement explicit removal of non-present keys
This commit is contained in:
parent
679f99d701
commit
436010ffe3
|
|
@ -443,6 +443,14 @@ class OptionalSection(Section):
|
|||
input.setDisabled()
|
||||
return super().render(data)
|
||||
|
||||
def parse(self, data):
|
||||
data = super().parse(data)
|
||||
# remove optional keys if they have been removed from the form
|
||||
for k in self.optional:
|
||||
if k not in data:
|
||||
data[k] = None
|
||||
return data
|
||||
|
||||
|
||||
class SdrDeviceDescription(object):
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Reference in a new issue