mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Allow setting metadata subentries that don't exist yet
Otherwise it crashes here. The ContainerManager should be flexible enough to allow that sort of thing. It works with plain entries, but crashed with subentries (like 'properties/diameter') if those weren't present yet in the metadata. Fixes Sentry issue CURA-3FH.
This commit is contained in:
parent
0f12b012cf
commit
4a08b88f31
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ class ContainerManager(QObject):
|
|||
for _ in range(len(entries)):
|
||||
item = item.get(entries.pop(0), {})
|
||||
|
||||
if item[entry_name] != entry_value:
|
||||
if entry_name not in item or item[entry_name] != entry_value:
|
||||
sub_item_changed = True
|
||||
item[entry_name] = entry_value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue