fix: consistent app ordering (#802)

See #358
This commit is contained in:
Luc Didry
2025-05-29 21:17:08 +02:00
committed by GitHub
parent 307b2aaada
commit afe2a730dc

View File

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