Skip to content

Commit

Permalink
[fix] pid is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
icepuma committed May 31, 2022
1 parent f3b3616 commit 595da3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/time_entries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn collect_output_entries(

for entry in values {
let maybe_workspace = workspace_lookup.get(&entry.wid);
let maybe_project = project_lookup.get(&entry.pid);
let maybe_project = &entry.pid.and_then(|pid| project_lookup.get(&pid));
let maybe_client = maybe_project
.and_then(|project| project.cid.and_then(|c| client_lookup.get(&c)));

Expand Down
2 changes: 1 addition & 1 deletion src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct DataWith<T> {
pub struct TimeEntry {
pub id: u64,
pub wid: u64,
pub pid: u64,
pub pid: Option<u64>,
pub billable: bool,
pub start: DateTime<Utc>,
pub stop: Option<DateTime<Utc>>,
Expand Down

0 comments on commit 595da3e

Please sign in to comment.