Fix purging scans by `build_id`
What does this MR do and why?
This MR fixes the purging security scans by build_id
logic.
This issue has been introduced by Fix query timeout issues on `Security::Scans::P... (!104532 - merged).
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.