Fix emptying the draft target_groups list causing all entries to appear.
Review Request #10411 — Created Feb. 16, 2019 and submitted — Latest diff uploaded
The API for the review request draft was generating a query incorrectly.
Setting an emptytarget_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 totarget_groups
,
though other fields (target_people
anddepends_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.