Fix emptying the draft target_groups list causing all entries to appear.
Review Request #1668 — Created June 4, 2019 and updated
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. Testing Done: Unit tests pass. Reproduced the issue locally and verified the fix. Bugs closed: 4790 Reviewed at https://reviews.reviewboard.org/r/10411/
Loading file attachments...