• 
      

    Fix a regression with matching repository and review group conditions.

    Review Request #10435 — Created Feb. 26, 2019 and submitted

    Information

    Review Board
    release-3.0.x

    Reviewers

    The recent access controls added for repository and review group choices
    for conditions resulted in a regression when matching these. Both of
    these implemented queryset logic that assumed access to an
    HttpRequest, but this wasn't the case during matching. The attempts
    caused a KeyError, which was getting caught at the wrong level and
    transformed into an entirely different form of error.

    This fixes the regression by changing the querysets yet again. Now, if
    we're in a condition matching mode (as indicated by a new matching
    state set for the choices), we revert back to a simpler query that
    just filters on the Local Site.

    Verified the failure in new unit tests, and that the issue is now
    fixed.

    Summary ID
    Fix a regression with matching repository and review group conditions.
    The recent access controls added for repository and review group choices for conditions resulted in a regression when matching these. Both of these implemented queryset logic that assumed access to an `HttpRequest`, but this wasn't the case during matching. The attempts caused a `KeyError`, which was getting caught at the wrong level and transformed into an entirely different form of error. This fixes the regression by changing the querysets yet again. Now, if we're in a condition matching mode (as indicated by a new `matching` state set for the choices), we revert back to a simpler query that just filters on the Local Site.
    21f1dcfe085442cf45f8114623b98d887f30f26f
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (0baa0ea)