mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
improve th esorting per item
This commit is contained in:
parent
5d826c21da
commit
e9a6b0a571
1 changed files with 3 additions and 1 deletions
|
|
@ -82,7 +82,9 @@ func (ps *PgStore) CardTotal(from, to time.Time) (float64, error) {
|
|||
|
||||
func (ps *PgStore) Get(id int) *Booking {
|
||||
b := &Booking{Id: id}
|
||||
ps.db.Preload("Items").First(b)
|
||||
ps.db.Preload("Items", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Order("item")
|
||||
}).First(b)
|
||||
return b
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue