Sort groups ascending by name.

This commit is contained in:
Bauke 2022-10-08 22:10:28 +02:00
parent fc2cccd53c
commit a25ae7adda
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 6 additions and 1 deletions

View File

@ -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)
} }