bug fix
This commit is contained in:
parent
89be8f3589
commit
4e39127952
1 changed files with 9 additions and 1 deletions
|
@ -109,7 +109,15 @@ def get_toggl_entries(
|
|||
f'Toggl responded with non-200 status code: {resp}, body: "{resp.text}"'
|
||||
)
|
||||
entries = resp.json()
|
||||
last_entry = next(filter(lambda x: x["duration"] > 0, entries), None)
|
||||
last_entry = next(
|
||||
filter(
|
||||
lambda x: x["duration"] > 0
|
||||
and entry["server_deleted_at"] is None
|
||||
and entry["project_id"] in projects,
|
||||
entries,
|
||||
),
|
||||
None,
|
||||
)
|
||||
|
||||
# construct a dict of d["project name"] = [[date, description, duration (hours), wage], ...]
|
||||
out = defaultdict(list)
|
||||
|
|
Loading…
Reference in a new issue