Fix emptying the draft target_groups list causing all entries to appear.
Review Request #10411 — Created Feb. 16, 2019 and submitted
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.
- Change Summary:
-
Added one more unit test for
depends_on
. - Commit:
-
aa0aaf268d843dfc2a12cb6127863c369c2f0a70fed87af8213688a05f5e42da65aa51e65ec42d67