Skip to content

Commit

Permalink
[api] ad rule fails with 403 error code
Browse files Browse the repository at this point in the history
Fix #37
  • Loading branch information
adfaure committed Dec 15, 2023
1 parent 2d6cf93 commit d843364
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oar/api/routers/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def submit(

(error, job_id_lst) = submission.submit(db, config)
if error[0] == -2:
raise HTTPException(status_code=418, detail=error[1])
raise HTTPException(status_code=403, detail=error[1])

# TODO Enhance
data = {}
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,4 +675,4 @@ def test_app_job_post_ar(
job_ids = minimal_db_initialization.query(Job.id).all()

assert job_ids == []
assert res.status_code == 418
assert res.status_code == 403

0 comments on commit d843364

Please sign in to comment.