Fix a crash when attempting to set submitter to an invalid value.

Review Request #10143 — Created Sept. 12, 2018 and updated

david
Review Board
release-3.0.x
76a0cb5...
reviewboard

We had some error handling for checking that someone wasn't trying to
set the submitter of a review request to a user that didn't exist, but
this failed in the local site case (and in the case of other failures
such as authentication backend errors). This change reorders the code so
that we don't get an UnboundLocalError, instead returning the correct
webapi error.

This adds a couple unit tests for the two cases (expected and unexpected
errors), and cleans up a related unit test that I came across while I
was in here.

Ran unit tests.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
Review request changed

Commit:

-21efc62cdd518d387529936dccbdb2e8fb6bb6f0
+76a0cb51ab90738fc4913af86c6e351c82ee3aea

Diff:

Revision 2 (+49 -10)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...