Merge pull request #269 from lehins/fix-latest-package-version

Fix the query for selecting the newest package version.
This commit is contained in:
Alexey Kuleshevich 2019-06-26 14:48:34 +03:00 committed by GitHub
commit c18e98d981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -552,7 +552,7 @@ getSnapshotPackageLatestVersion pname =
run (snapshotPackageInfoQuery $ \_sp s pn v spiQ -> do
where_ (pn ^. PackageNameName ==. val pname)
orderBy
[ desc (stringToArray (v ^. VersionVersion) (val ("." :: String)))
[ desc (versionArray v)
, desc (s ^. SnapshotCreated)
]
limit 1