mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-22 12:48:25 +00:00
Prevents duplication of study on update.
This commit is contained in:
parent
eb6354db6e
commit
443d38a9a1
@ -35,7 +35,7 @@ def update_study(study_id, body):
|
||||
error = ApiError('unknown_study', 'The study "' + study_id + '" is not recognized.')
|
||||
return ApiErrorSchema.dump(error), 404
|
||||
|
||||
study = StudyModelSchema().load(body, session=session)
|
||||
study = StudyModelSchema().load(body, session=session, instance=study)
|
||||
session.add(study)
|
||||
session.commit()
|
||||
return StudyModelSchema().dump(study)
|
||||
|
Loading…
x
Reference in New Issue
Block a user