Skip to content

Commit b4ffe6b

Browse files
author
Trong Nhan Mai
committed
fix: fix the sql statement for obtaining build check facts where the check result was mistakenly joined on the checkfacts.id instead og checkfact.check_result_id
1 parent 891df13 commit b4ffe6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macaron/build_spec_generator/macaron_db_extractor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def get_sql_stmt_build_as_code_check(component_id: int) -> Select[tuple[BuildAsC
240240
)
241241
.join(
242242
CheckFacts,
243-
onclause=MappedCheckResult.id == CheckFacts.id,
243+
onclause=MappedCheckResult.id == CheckFacts.check_result_id,
244244
)
245245
.join(
246246
build_as_code_facts_alias,
@@ -287,7 +287,7 @@ def get_sql_stmt_build_service_check(component_id: int) -> Select[tuple[BuildSer
287287
)
288288
.join(
289289
CheckFacts,
290-
onclause=MappedCheckResult.id == CheckFacts.id,
290+
onclause=MappedCheckResult.id == CheckFacts.check_result_id,
291291
)
292292
.join(
293293
build_service_facts_alias,
@@ -330,11 +330,11 @@ def get_sql_stmt_build_script_check(component_id: int) -> Select[tuple[BuildScri
330330
.select_from(Component)
331331
.join(
332332
MappedCheckResult,
333-
onclause=Component.id == MappedCheckResult.component_id,
333+
onclause=MappedCheckResult.component_id == Component.id,
334334
)
335335
.join(
336336
CheckFacts,
337-
onclause=MappedCheckResult.id == CheckFacts.id,
337+
onclause=MappedCheckResult.id == CheckFacts.check_result_id,
338338
)
339339
.join(
340340
build_script_facts_alias,

0 commit comments

Comments
 (0)