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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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
}