fix an introduced bug

This commit is contained in:
Abraham Toriz 2021-07-13 17:54:20 -05:00
parent 74e9b164c5
commit b20b138ea5
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
1 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ impl Database for SqliteDatabase {
fn entry_query(&self, query: &str, params: &[&dyn ToSql]) -> Result<Vec<Entry>> {
let mut stmt = self.connection.prepare(query)?;
let x = stmt.query_and_then(params, |row| {
let entries = stmt.query_and_then(params, |row| {
let id: u64 = row.get("id")?;
let note = row.get("note")?;
let sheet = row.get("sheet")?;
@ -214,7 +214,7 @@ impl Database for SqliteDatabase {
col: "start".into(),
}
})?;
let end = row.get("start").map_err(|_| {
let end = row.get("end").map_err(|_| {
Error::InvalidTimeInDatabase {
id: id.to_string(),
col: "start".into(),
@ -226,7 +226,7 @@ impl Database for SqliteDatabase {
})
})?.collect();
x
entries
}
fn meta_query(&self, query: &str, params: &[&dyn ToSql]) -> Result<Vec<Meta>> {