mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-22 10:48:30 +00:00
Merge pull request #159 from mstg/latest-ir-fix
fix: Import Revisions from other projects should NOT be counted as latest
This commit is contained in:
commit
7a95bf17ec
@ -90,6 +90,7 @@ func (a *Access) GetLatestImportRevisionsForPackageInProject(packageName string,
|
|||||||
pv.release
|
pv.release
|
||||||
from
|
from
|
||||||
import_revisions ir
|
import_revisions ir
|
||||||
|
inner join imports i on i.id = ir.import_id
|
||||||
inner join project_package_versions ppv on ppv.package_version_id = ir.package_version_id
|
inner join project_package_versions ppv on ppv.package_version_id = ir.package_version_id
|
||||||
inner join package_versions pv on pv.id = ir.package_version_id
|
inner join package_versions pv on pv.id = ir.package_version_id
|
||||||
inner join packages p on p.id = ppv.package_id
|
inner join packages p on p.id = ppv.package_id
|
||||||
@ -97,6 +98,7 @@ func (a *Access) GetLatestImportRevisionsForPackageInProject(packageName string,
|
|||||||
where
|
where
|
||||||
p.name = $1
|
p.name = $1
|
||||||
and ppv.project_id = $2
|
and ppv.project_id = $2
|
||||||
|
and i.project_id = $2
|
||||||
and ppv.active = true
|
and ppv.active = true
|
||||||
order by ir.created_at desc
|
order by ir.created_at desc
|
||||||
`,
|
`,
|
||||||
|
Loading…
Reference in New Issue
Block a user