Skip to content

Commit c637bc3

Browse files
authored
do not run unnecessary update on put (#736)
1 parent e7de829 commit c637bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

store/neurostore/resources/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ def put(self, id):
472472

473473
try:
474474
self.update_base_studies(unique_ids.get("base-studies"))
475-
self.update_annotations(unique_ids.get("annotations"))
475+
if self._model is not Annotation:
476+
self.update_annotations(unique_ids.get("annotations"))
476477
except SQLAlchemyError as e:
477478
db.session.rollback()
478479
abort(400, description=str(e))

0 commit comments

Comments
 (0)