From f80e1ec2790d7fca93ac5e6de0b5a0a1ad62df6d Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Wed, 1 Sep 2021 18:32:40 +0200 Subject: [PATCH] Updated documentation Contributes to CURA-6096 --- cura/Settings/DatabaseHandlers/QualityDatabaseHandler.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cura/Settings/DatabaseHandlers/QualityDatabaseHandler.py b/cura/Settings/DatabaseHandlers/QualityDatabaseHandler.py index 286ab19271..43de7cb098 100644 --- a/cura/Settings/DatabaseHandlers/QualityDatabaseHandler.py +++ b/cura/Settings/DatabaseHandlers/QualityDatabaseHandler.py @@ -24,6 +24,14 @@ class QualityDatabaseHandler(DatabaseMetadataContainerController): self.container_type = InstanceContainer def groomMetadata(self, metadata: metadata_type) -> metadata_type: + """ + Ensures that the metadata is in the order of the field keys and has the right size. + if the metadata doesn't contains a key which is stored in the DB it will add it as + an empty string. Key, value pairs that are not stored in the DB are dropped. + If the `global_quality` isn't set it well default to 'False' + + :param metadata: The container metadata + """ if "global_quality" not in metadata: metadata["global_quality"] = "False" return super().groomMetadata(metadata)