fix: 🐛 Push associated targets in sessions to ember store (#2518)
This commit is contained in:
1 parent
0ff91f9182
commit
e38c28c288
1 file changed
+12
-18
@@ -136,27 +136,21 @@ export default class ScopesScopeProjectsSessionsIndexRoute extends Route {
|
||||
const chunkedTargetIds = chunk(uniqueTargetIds, 50);
|
||||
|
||||
const associatedTargetsPromises = chunkedTargetIds.map((targetIds) =>
|
||||
this.store.query(
|
||||
'target',
|
||||
{
|
||||
scope_id: orgScope.id,
|
||||
recursive: true,
|
||||
force_refresh: true,
|
||||
query: {
|
||||
filters: {
|
||||
id: {
|
||||
logicalOperator: 'or',
|
||||
values: targetIds.map((targetId) => ({
|
||||
equals: targetId,
|
||||
})),
|
||||
},
|
||||
this.store.query('target', {
|
||||
scope_id: orgScope.id,
|
||||
recursive: true,
|
||||
force_refresh: true,
|
||||
query: {
|
||||
filters: {
|
||||
id: {
|
||||
logicalOperator: 'or',
|
||||
values: targetIds.map((targetId) => ({
|
||||
equals: targetId,
|
||||
})),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
pushToStore: false,
|
||||
},
|
||||
),
|
||||
}),
|
||||
);
|
||||
|
||||
const targetsArray = await Promise.all(associatedTargetsPromises);
|
||||
|
||||
Reference in new issue
Block a user