Fix emptying the draft target_groups list causing all entries to appear.

Review Request #10411 — Created Feb. 16, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
c7bb269...

Reviewers

The API for the review request draft was generating a query incorrectly.
Setting an empty target_groups value would result in all available
groups on the global or Local Site to appear, meaning it was impossible
to clear out the list. This problem was specific to target_groups,
though other fields (target_people and depends_on) performed
effectively useless queries as well.

This change fixes this to check whether the list of values is empty
before doing any real work. If it is empty, then empty values are
immediately returned.

Unit tests pass.

Reproduced the issue locally and verified the fix.

    Loading...