Sort by start_time in beta mode only, to fix failing tests caused by changing the sorting

This commit is contained in:
David Dworken 2023-08-27 15:20:40 -07:00
parent 25ec191f1a
commit 5dae81d336
No known key found for this signature in database

View File

@ -1182,7 +1182,11 @@ func Search(ctx *context.Context, db *gorm.DB, query string, limit int) ([]*data
if err != nil {
return nil, err
}
tx = tx.Order("start_time DESC")
if hctx.GetConf(ctx).BetaMode {
tx = tx.Order("start_time DESC")
} else {
tx = tx.Order("end_time DESC")
}
if limit > 0 {
tx = tx.Limit(limit)
}