mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 17:35:55 +08: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
@ -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…
x
Reference in New Issue
Block a user