thunderbird / thunderbird/appointment
Removing google calendar can raise ObjectDeletedError
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 552
- Forks
- 29
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 23
Description
Sentry: https://thunderbird.sentry.io/issues/6499868301/?environment=prod&project=4505428124827648
https://github.com/thunderbird/appointment/blob/main/backend/src/appointment/routes/google.py#L173
In routes.google.disconnect we reference the google connection model object after we delete it. Normally this would be fine. But I assume sqlalchemy might be lazy loading attributes here which causes it to try and reload the model, which no longer exists.
We should pull the name out of the model at the top, delete the model and then use the local copy we made.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in backend/src/appointment/routes/google.py around line 173, focusing on routes.google.disconnect and the Google connection model. Check how the connection name is accessed after deletion and reproduce or inspect the Sentry ObjectDeletedError. Done means disconnect uses the saved name without reloading the deleted model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100