make versions optional
This commit is contained in:
parent
5a356e65a7
commit
42095f2fbd
@ -45,8 +45,8 @@ pub struct ListPackageModel {
|
|||||||
name: String,
|
name: String,
|
||||||
status: i32,
|
status: i32,
|
||||||
outofdate: bool,
|
outofdate: bool,
|
||||||
latest_version: String,
|
latest_version: Option<String>,
|
||||||
latest_version_id: i32,
|
latest_version_id: Option<i32>,
|
||||||
latest_aur_version: String,
|
latest_aur_version: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ pub async fn package_list(
|
|||||||
let db = db as &DatabaseConnection;
|
let db = db as &DatabaseConnection;
|
||||||
|
|
||||||
let all: Vec<ListPackageModel> = Packages::find()
|
let all: Vec<ListPackageModel> = Packages::find()
|
||||||
.join_rev(JoinType::InnerJoin, versions::Relation::LatestPackage.def())
|
.join_rev(JoinType::LeftJoin, versions::Relation::LatestPackage.def())
|
||||||
.select_only()
|
.select_only()
|
||||||
.column(packages::Column::Name)
|
.column(packages::Column::Name)
|
||||||
.column(packages::Column::Id)
|
.column(packages::Column::Id)
|
||||||
|
Loading…
Reference in New Issue
Block a user