Sort groups ascending by name.
This commit is contained in:
parent
fc2cccd53c
commit
a25ae7adda
|
@ -19,7 +19,12 @@ impl GroupDataModel {
|
||||||
db: &DatabaseConnection,
|
db: &DatabaseConnection,
|
||||||
snapshot: &SnapshotModel,
|
snapshot: &SnapshotModel,
|
||||||
) -> Result<Vec<Self>> {
|
) -> Result<Vec<Self>> {
|
||||||
let groups = snapshot.find_related(GroupDataEntity).all(db).await?;
|
let groups = snapshot
|
||||||
|
.find_related(GroupDataEntity)
|
||||||
|
.order_by_asc(GroupDataColumn::Name)
|
||||||
|
.all(db)
|
||||||
|
.await?;
|
||||||
|
|
||||||
Ok(groups)
|
Ok(groups)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue