Skip to content

Commit 8ae7d53

Browse files
authored
Fix PeriodicReports type filter (#2994)
1 parent 80a60a4 commit 8ae7d53

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/periodic-report/periodic-report.repository.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class PeriodicReportRepository extends DtoRepository<
182182
const filters = { type, parent, start, end };
183183
const result = await this.db
184184
.query()
185-
.matchNode('node', `${type || ''}Report`)
185+
.matchNode('node', 'PeriodicReport')
186186
.apply(
187187
filter.builder(filters, {
188188
parent: filter.pathExists((id) => [
@@ -192,8 +192,7 @@ export class PeriodicReportRepository extends DtoRepository<
192192
]),
193193
start: filter.dateTimeProp(),
194194
end: filter.dateTimeProp(),
195-
//TODO: determine how to fix this type filter
196-
type: ({ value }) => hasLabel(`${value}Report`),
195+
type: ({ value }) => ({ node: hasLabel(`${value}Report`) }),
197196
}),
198197
)
199198
.apply(sorting(resource, input))

0 commit comments

Comments
 (0)