Skip to content

Commit

Permalink
Fix sql query
Browse files Browse the repository at this point in the history
  • Loading branch information
Lun4m committed Jun 10, 2024
1 parent 11f3a88 commit c411d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ingestion/src/kldata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ pub async fn filter_and_label_kldata(
WHERE nationalnummer = $1 \
AND type_id = $2 \
AND param_code = $3 \
AND (lvl IS NULL OR lvl = $4) \
AND (sensor IS NULL OR sensor = $5)",
AND (($4 IS NULL AND lvl IS NULL) OR (lvl = $4)) \
AND (($5 IS NULL AND sensor IS NULL) OR (sensor = $5))",
)
.await?;

Expand Down

0 comments on commit c411d18

Please sign in to comment.