Replace more instances of system->system-id with lookup-system-id

To avoid systems being inserted from queries.
This commit is contained in:
Christopher Baines 2025-07-04 14:16:03 +01:00
parent 98e1b6b3c7
commit 02947cc9c4
3 changed files with 4 additions and 4 deletions

View file

@ -1421,7 +1421,7 @@ SELECT store_path FROM derivation_source_files WHERE id = $1"
(get-sql-to-select-package-and-related-derivations-for-revision (get-sql-to-select-package-and-related-derivations-for-revision
conn conn
(commit->revision-id conn commit) (commit->revision-id conn commit)
#:system-id (system->system-id conn system) #:system-id (lookup-system-id conn system)
#:target target) #:target target)
" "
SELECT derivations.file_name SELECT derivations.file_name

View file

@ -55,7 +55,7 @@
'()) '())
,@(if system ,@(if system
`(("package_derivations.system_id = $" . `(("package_derivations.system_id = $" .
,(number->string (system->system-id conn system)))) ,(number->string (lookup-system-id conn system))))
'()) '())
,@(if target ,@(if target
`(("package_derivations.target = $" . ,target)) `(("package_derivations.target = $" . ,target))
@ -184,7 +184,7 @@ WHERE derivations.file_name = $1"
'()) '())
,@(if system ,@(if system
`(("package_derivations.system_id = $" . `(("package_derivations.system_id = $" .
,(number->string (system->system-id conn system)))) ,(number->string (lookup-system-id conn system))))
'()) '())
,@(if target ,@(if target
`(("package_derivations.target = $" . ,target)) `(("package_derivations.target = $" . ,target))

View file

@ -240,7 +240,7 @@ ORDER BY systems.system DESC,
'("package_derivations.system_id" "target") '("package_derivations.system_id" "target")
(list (list
(and=> system (lambda (system) (and=> system (lambda (system)
(system->system-id conn system))) (lookup-system-id conn system)))
targets)) targets))
,@(if minimum-builds ,@(if minimum-builds
(list (list