#1834 - Bugfix when removing item in double nested maps
This commit is contained in:
parent
d86dcb2ee9
commit
71e86ab417
1 changed files with 6 additions and 3 deletions
|
|
@ -197,15 +197,18 @@ class Item(BaseModel):
|
|||
# Hack but it'll do, traverses into a dict
|
||||
last_val_type = list(last_val.keys())
|
||||
if last_val_type and last_val_type[0] == 'M':
|
||||
last_val = last_val['M']
|
||||
last_val = last_val['M']
|
||||
|
||||
if key_part not in last_val:
|
||||
last_val[key_part] = {'M': {}}
|
||||
|
||||
last_val = last_val[key_part]
|
||||
|
||||
last_val.pop(key_parts[-1], None)
|
||||
self.attrs.pop(value, None)
|
||||
last_val_type = list(last_val.keys())
|
||||
if last_val_type and last_val_type[0] == 'M':
|
||||
last_val['M'].pop(key_parts[-1], None)
|
||||
else:
|
||||
last_val.pop(key_parts[-1], None)
|
||||
elif action == 'SET':
|
||||
key, value = value.split("=", 1)
|
||||
key = key.strip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue