fixes
This commit is contained in:
parent
71abc0ca74
commit
ad97a36c60
5 changed files with 17 additions and 6 deletions
|
@ -94,7 +94,11 @@ pub fn print_task_info(task_id: isize, api: &VikunjaAPI) {
|
|||
crossterm::style::Color::Green,
|
||||
&format!(
|
||||
"{} ✓ ",
|
||||
time_relative(parse_datetime(&task.done_at).unwrap())
|
||||
if let Some(dt) = parse_datetime(&task.done_at) {
|
||||
time_relative(dt)
|
||||
} else {
|
||||
String::new()
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -110,7 +114,10 @@ pub fn print_task_info(task_id: isize, api: &VikunjaAPI) {
|
|||
&format!(" [{}]\n", api.get_project_name_from_id(task.project_id)),
|
||||
);
|
||||
|
||||
println!("Created by {}", task.created_by.username);
|
||||
if let Some(user) = task.created_by {
|
||||
println!("Created by {}", user.username);
|
||||
}
|
||||
|
||||
println!(
|
||||
"Created: {} | Updated: {}",
|
||||
time_relative(parse_datetime(&task.created).unwrap()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue