Skip to content

Commit

Permalink
Fix query to return expected integer values instead of float
Browse files Browse the repository at this point in the history
  • Loading branch information
meaksh committed Jul 22, 2024
1 parent 912f438 commit a616b0d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ SELECT P.id, P.summary, PP.name as provider
SELECT pk.id AS package_id
-- Convert the ids to 0/1 flags
, SIGN(COALESCE(rp.package_id, 0)) AS retracted
, SIGN(COALESCE(CAST(pk.is_ptf AS INTEGER), 0)) AS master_ptf_package
, SIGN(COALESCE(CAST(pk.is_part_of_ptf AS INTEGER), 0)) AS part_of_ptf
, SIGN(COALESCE(CAST(pk.is_ptf AS INTEGER), 0))::int AS master_ptf_package
, SIGN(COALESCE(CAST(pk.is_part_of_ptf AS INTEGER), 0))::int AS part_of_ptf
FROM rhnpackage pk
LEFT JOIN retractedPackages rp ON rp.package_id = pk.id
WHERE pk.id IN (%s) AND ( rp.package_id IS NOT NULL OR pk.is_ptf = TRUE OR pk.is_part_of_ptf = TRUE )
Expand Down

0 comments on commit a616b0d

Please sign in to comment.