mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Add AND filter to related search.
Signed-off-by: Yunfan Zhang <yz322@duke.edu>
This commit is contained in:
committed by
Jared Tabor
parent
6b64ef8f64
commit
b191f6cfc3
@@ -80,15 +80,16 @@ function QuerysetService ($q, Rest, ProcessErrors, $rootScope, Wait, DjangoSearc
|
||||
},
|
||||
// like encodeQueryset, but return an actual unstringified API-consumable http param object
|
||||
encodeQuerysetObject(params) {
|
||||
console.log(params);
|
||||
return _.reduce(params, (obj, value, key) => {
|
||||
const encodedTerms = this.encodeTerms(value, key);
|
||||
|
||||
console.log(encodedTerms);
|
||||
for (let encodedIndex in encodedTerms) {
|
||||
const [encodedKey, encodedValue] = encodedTerms[encodedIndex];
|
||||
obj[encodedKey] = obj[encodedKey] || [];
|
||||
obj[encodedKey].push(encodedValue);
|
||||
}
|
||||
|
||||
console.log(obj);
|
||||
return obj;
|
||||
}, {});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user