diff --git a/backend/webserver/api/datasets.py b/backend/webserver/api/datasets.py index 9b2b9588..f0e7aac3 100644 --- a/backend/webserver/api/datasets.py +++ b/backend/webserver/api/datasets.py @@ -216,8 +216,10 @@ def post(self, dataset_id): update[f'set__metadata__{key}'] = value dataset.default_annotation_metadata = default_annotation_metadata - AnnotationModel.objects(dataset_id=dataset.id, deleted=False)\ - .update(**update) + + if len(update.keys()) > 0: + AnnotationModel.objects(dataset_id=dataset.id, deleted=False)\ + .update(**update) dataset.update( categories=dataset.categories,