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 New Issue
Block a user