Skip to content

Commit eb24a60

Browse files
committed
TC-2174 OSV Python ecosystem management (review fixes)
Signed-off-by: mrizzi <[email protected]>
1 parent 8ed7bf5 commit eb24a60

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

migration/src/m0000850_python_version.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ impl MigrationTrait for Migration {
99
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
1010
let db = manager.get_connection();
1111

12-
db.execute_unprepared(
13-
&Query::update()
14-
.table(VersionScheme::Table)
15-
.value(VersionScheme::Id, "python")
16-
.and_where(Expr::col(VersionScheme::Id).eq("pypi"))
17-
.to_owned()
18-
.to_string(PostgresQueryBuilder),
12+
db.execute(
13+
db.get_database_backend().build(
14+
Query::update()
15+
.table(VersionScheme::Table)
16+
.value(VersionScheme::Id, "python")
17+
.and_where(Expr::col(VersionScheme::Id).eq("pypi")),
18+
),
1919
)
2020
.await?;
2121

modules/ingestor/src/service/advisory/osv/loader.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,7 @@ impl<'g> OsvLoader<'g> {
173173
)
174174
.await?;
175175
}
176-
(RangeType::Ecosystem, Ecosystem::PyPI) => {
177-
create_package_status(
178-
&advisory_vuln,
179-
&purl,
180-
range,
181-
&VersionScheme::Python,
182-
&tx,
183-
)
184-
.await?;
185-
}
186-
(RangeType::Ecosystem, Ecosystem::Python) => {
176+
(RangeType::Ecosystem, Ecosystem::PyPI | Ecosystem::Python) => {
187177
create_package_status(
188178
&advisory_vuln,
189179
&purl,

0 commit comments

Comments
 (0)