Skip to content

Commit aba395d

Browse files
Fix panic
1 parent 6fd427b commit aba395d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

database/src/pool/postgres.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,10 @@ where
888888
Some(match ty.as_str() {
889889
"try" | "master" => ArtifactId::Commit(Commit {
890890
sha: row.get(0),
891-
date: Date(row.get(1)),
891+
date: row
892+
.get::<_, Option<_>>(1)
893+
.map(Date)
894+
.unwrap_or_else(|| Date::ymd_hms(2001, 01, 01, 0, 0, 0)),
892895
}),
893896
"release" => ArtifactId::Artifact(row.get(0)),
894897
_ => {

0 commit comments

Comments
 (0)