From afe2a730dc48e8695a755510db74fa6425789e8a Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 29 May 2025 21:17:08 +0200 Subject: [PATCH] fix: consistent app ordering (#802) See #358 --- database/application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/application.go b/database/application.go index 4ef9c0e..f62f468 100644 --- a/database/application.go +++ b/database/application.go @@ -47,7 +47,7 @@ func (d *GormDatabase) DeleteApplicationByID(id uint) error { // GetApplicationsByUser returns all applications from a user. func (d *GormDatabase) GetApplicationsByUser(userID uint) ([]*model.Application, error) { var apps []*model.Application - err := d.DB.Where("user_id = ?", userID).Find(&apps).Error + err := d.DB.Where("user_id = ?", userID).Order("id ASC").Find(&apps).Error if err == gorm.ErrRecordNotFound { err = nil }