Skip to content

Commit 08986c2

Browse files
committed
Tweak project filters to only cast once
1 parent c811673 commit 08986c2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/components/project/project.edgedb.repository.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,10 @@ export class ProjectEdgeDBRepository
101101
e.op(
102102
project.status,
103103
'in',
104-
e.set(...input.status!.map((s) => e.cast(e.Project.Status, s))),
104+
e.cast(e.Project.Status, e.set(...input.status!)),
105105
),
106106
(input.step?.length ?? 0) > 0 &&
107-
e.op(
108-
project.step,
109-
'in',
110-
e.set(...input.step!.map((s) => e.cast(e.Project.Step, s))),
111-
),
107+
e.op(project.step, 'in', e.cast(e.Project.Step, e.set(...input.step!))),
112108
input.onlyMultipleEngagements && e.op(project.engagementTotal, '>', 1),
113109
...(input.createdAt
114110
? [
@@ -160,7 +156,7 @@ export class ProjectEdgeDBRepository
160156
e.op(
161157
project.sensitivity,
162158
'in',
163-
e.set(...input.sensitivity!.map((s) => e.cast(e.Sensitivity, s))),
159+
e.cast(e.Sensitivity, e.set(...input.sensitivity!)),
164160
),
165161
];
166162
}

0 commit comments

Comments
 (0)