Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/migrations' into migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Aydawka committed Oct 10, 2023
2 parents 842257f + 7f5b7e4 commit cb2b7e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apis/contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def put(self, study_id: int, user_id: int):
@api.response(200, "Success")
@api.response(400, "Validation Error")
def delete(self, study_id: int, user_id: str):
study =model.Study.query.get(study_id)
study = model.Study.query.get(study_id)
if not study:
return "study is not found", 404
granter = model.StudyContributor.query.filter(
Expand Down Expand Up @@ -193,7 +193,8 @@ def put(self, study_id: int, user_id: int):
).first()
existing_contributor.permission = "owner"
existing_owner = model.StudyContributor.query.filter(
model.StudyContributor.study == study, model.StudyContributor.permission == "owner"
model.StudyContributor.study == study,
model.StudyContributor.permission == "owner",
).first()

existing_owner.permission = "admin"
Expand Down

0 comments on commit cb2b7e2

Please sign in to comment.