Skip to content

Commit 566230e

Browse files
Exclude metaallocators from latest-scores endpoint
1 parent e6c0010 commit 566230e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

prisma/sql/getAllocatorLatestScores.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ with "max_ranges" as (select "scoring_result_id" as "scoring_result_id",
6666
null as "data_type"
6767
from "allocator_registry_archive"),
6868
--
69-
"selected_allocators" as (select distinct on ("allocator_id") "allocator_id" as "allocator_id",
69+
"edition_6_allocators" as (select distinct on ("allocator_id") "allocator_id" as "allocator_id",
7070
"edition_id" as "edition_id",
7171
"data_type" as "data_type"
7272
from "all_allocators"
7373
where "edition_id" = 6
7474
order by "allocator_id", "data_type"),
75+
--
76+
"selected_allocators" as (select *
77+
from "edition_6_allocators"
78+
left join "allocator" on "edition_6_allocators"."allocator_id" = "allocator"."id"
79+
where "allocator"."is_metaallocator" = false
80+
or "allocator"."is_metaallocator" is null),
7581
--
7682
"result" as (select "latest_reports".*,
7783

0 commit comments

Comments
 (0)