You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requesting the pid of a retrieved TimeEntry no longer works. After some searching it seems the mapping broke since a time entry no longer seems to report a project_id, but a pid instead..
Reproducible example:
fromdatetimeimportdatetimefromtogglimportapi, utilsconfig=utils.Config.factory(None)
withopen('.toggl-api-rc') asf:
config.api_token=f.read().strip()
# Sample date with some time entries assigned to projectsdate= (2024, 6, 27)
start, end=datetime(*date, 0), datetime(*date, 23)
entry=list(api.TimeEntry.objects.all_from_reports(config=config, start=start, stop=end))[0]
>>>entry.pid
[Traceback ...]
AttributeError: 'TimeEntry'objecthasnoattribute'pid'>>>entry.project_id
[Traceback ...]
AttributeError: 'TimeEntry'objecthasnoattribute'project_id'>>>entry.project
[Traceback ...]
AttributeError: Instance<entrydescription> (#3506117392) has not set mapping field 'project'/'project_id'
Replacing this in line 845 of api/models.py fixes the problem:
Requesting the
pid
of a retrievedTimeEntry
no longer works. After some searching it seems the mapping broke since a time entry no longer seems to report aproject_id
, but apid
instead..Reproducible example:
Replacing this in line 845 of
api/models.py
fixes the problem:toggl-cli/toggl/api/models.py
Line 845 in 8282bf3
The text was updated successfully, but these errors were encountered: