Skip to content

Commit

Permalink
Fixed default metadata not throwing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks authored Apr 17, 2019
1 parent cf9f400 commit 17eca04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/webserver/api/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 17eca04

Please sign in to comment.