#4448 Setting Minimum_score_to_merge_pull-request options through the API returns a 500
Closed: Fixed 4 years ago by pingou. Opened 4 years ago by tdecacqu.

Trying to enable pull_requests on a fork, I did (to not reset the other options according to the doc):

options = requests.get("/api/0/fork/tdecacqu/project/options").json()["settings"]
if not options.get("pull_requests"):
    options["pull_requests"] = true
    requests.post("/api/0/fork/tdecacqu/project/options/update", data=options)

But this returns a 500. Looping over the keys, it seems like the culpit is this option name:
RuntimeError: POST https://stg.pagure.io/api/0/fork/tdecacqu/test-no-namespace/options/update ({'Minimum_score_to_merge_pull-request': -1}) failed (500)


Metadata Update from @pingou:
- Issue tagged with: bug

4 years ago

grr, I've just tried this on a local instance and it is working fine :(

python2 vs python3...

Got the fix :)

Metadata Update from @pingou:
- Issue assigned to pingou
- Issue set to the milestone: 5.6

4 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #4454 Merged 4 years ago