Skip to content

Commit 3bb9a6d

Browse files
committed
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.
1 parent f76943f commit 3bb9a6d

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)