Skip to content

Commit 7a95bf1

Browse files
Merge pull request #159 from mstg/latest-ir-fix
fix: Import Revisions from other projects should NOT be counted as latest
2 parents 1eae207 + 096a7fd commit 7a95bf1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

peridot/db/psql/import.go

+2
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ func (a *Access) GetLatestImportRevisionsForPackageInProject(packageName string,
9090
pv.release
9191
from
9292
import_revisions ir
93+
inner join imports i on i.id = ir.import_id
9394
inner join project_package_versions ppv on ppv.package_version_id = ir.package_version_id
9495
inner join package_versions pv on pv.id = ir.package_version_id
9596
inner join packages p on p.id = ppv.package_id
9697
inner join projects proj on proj.id = ppv.project_id
9798
where
9899
p.name = $1
99100
and ppv.project_id = $2
101+
and i.project_id = $2
100102
and ppv.active = true
101103
order by ir.created_at desc
102104
`,

0 commit comments

Comments
 (0)