Sort groups ascending by name.
This commit is contained in:
parent
fc2cccd53c
commit
a25ae7adda
|
@ -19,7 +19,12 @@ impl GroupDataModel {
|
|||
db: &DatabaseConnection,
|
||||
snapshot: &SnapshotModel,
|
||||
) -> 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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue