Skip to content

Commit a9b81b0

Browse files
committed
fix: explicit sort id ascending
1 parent 885cd08 commit a9b81b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/packages/package_file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func TryInsertFile(ctx context.Context, pf *PackageFile) (*PackageFile, error) {
6868
// GetFilesByVersionID gets all files of a version
6969
func GetFilesByVersionID(ctx context.Context, versionID int64) ([]*PackageFile, error) {
7070
pfs := make([]*PackageFile, 0, 10)
71-
return pfs, db.GetEngine(ctx).OrderBy("id").Where("version_id = ?", versionID).Find(&pfs)
71+
return pfs, db.GetEngine(ctx).OrderBy("id ASC").Where("version_id = ?", versionID).Find(&pfs)
7272
}
7373

7474
// GetFileForVersionByID gets a file of a version by id

0 commit comments

Comments
 (0)