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

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

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
brennie
  1. 
      
  2. Any reason you're not using webapi_test_template for these tests?

    1. None of the others in this file use it. I can clean that up but it should be a separate change.

  3. 
      
brennie
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (7633758)
Loading...