diff --git a/CHANGELOG.md b/CHANGELOG.md index 7149fc8..018a2a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.2.4] - 2022-01-27 +### Fixed + +- Ensure logir is not null + ### Added - Format datetime in locale format [github#1](https://github.com/imlonghao/archlinuxcn-packages/pull/1) diff --git a/src/main.rs b/src/main.rs index fa1023e..d5f77ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -233,7 +233,7 @@ async fn get_pkg_log( let conn = db.get().await.unwrap(); let rows = conn .query( - "select logdir from lilac.batch where ts < $1 and event = 'start' order by id desc limit 1", + "select logdir from lilac.batch where ts < $1 and event = 'start' and logdir is not null order by id desc limit 1", &[&dt], ) .await