Conflict in quality changes is now handled less naive

Instead of only checking ID, we also check values of the QC

CURA-1263
This commit is contained in:
Jaime van Kessel 2016-11-16 13:10:42 +01:00
parent fcd4fb86f5
commit 100e1f4f40
2 changed files with 6 additions and 1 deletions

View file

@ -78,7 +78,10 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
# Check if quality changes already exists.
quality_changes = self._container_registry.findInstanceContainers(id = container_id)
if quality_changes:
quality_changes_conflict = True
# Check if there really is a conflict by comparing the values
if quality_changes[0] != instance_container:
quality_changes_conflict = True
break
if machine_conflict or quality_changes_conflict:
# There is a conflict; User should choose to either update the existing data, add everything as new data or abort