Skip to content

Commit b2b2cfb

Browse files
committed
Auto merge of #4099 - Turbo87:top-versions, r=JohnTitor
models::Krate: Change `top_versions()` to query `created_at` instead of `updated_at` If a version is yanked and unyanked it shouldn't show up as the "newest" version, if there are legitimately newer versions available.
2 parents f76943f + 3bb9a6d commit b2b2cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/krate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl Crate {
311311
use crate::schema::versions::dsl::*;
312312

313313
Ok(TopVersions::from_date_version_pairs(
314-
self.versions().select((updated_at, num)).load(conn)?,
314+
self.versions().select((created_at, num)).load(conn)?,
315315
))
316316
}
317317

0 commit comments

Comments
 (0)