mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-10 04:36:50 +00:00
improve th esorting per item (#23)
This commit is contained in:
parent
5d826c21da
commit
42764ab6cc
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