(toggl-portal): Fix issue with start and stop transitioning to from raw to database types. I really need to write some tests

This commit is contained in:
Joshua Coles 2023-11-06 21:41:00 +00:00
parent 8e2356ac85
commit cc838ef145

View File

@ -13,7 +13,7 @@ impl ReportEntry {
description: Set(self.description.clone()),
project_id: Set(self.project_id.map(|id| id as i64)),
start: Set(chrono::DateTime::parse_from_rfc3339(&inner.start).unwrap()),
stop: Set(chrono::DateTime::parse_from_rfc3339(&inner.start).unwrap()),
stop: Set(chrono::DateTime::parse_from_rfc3339(&inner.stop).unwrap()),
raw_json: Set(serde_json::to_value(inner).unwrap()),
})
.collect()