Skip to content

Conversation

julienbourdeau
Copy link
Contributor

Expose pending_deletion

When you delete a plan via the API, you get it in the response but nothing shows that it is deleted or about to be deleted.
Because deletion is async, getting this plan from the API will work as if nothing happened until the job is processed.

Need openapi and clients update.

use update_all instead of .each{ it.update! }

A plan can have maaany children and since we're not calling a service or relying on any model callbacks, I believe it's best to flag them all at once.

Introduced here: 69a8470

@julienbourdeau julienbourdeau requested a review from rsempe July 10, 2025 13:42
@julienbourdeau julienbourdeau self-assigned this Jul 10, 2025
@julienbourdeau julienbourdeau merged commit 89bad5e into main Jul 10, 2025
14 checks passed
@julienbourdeau julienbourdeau deleted the fix/plan-deletion branch July 10, 2025 14:15
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
### Expose `pending_deletion` 

When you delete a plan via the API, you get it in the response but
nothing shows that it is deleted or about to be deleted.
Because deletion is async, getting this plan from the API will work as
if nothing happened until the job is processed.

Need openapi and clients update.

### use `update_all` instead of `.each{ it.update! }`

A plan can have maaany children and since we're not calling a service or
relying on any model callbacks, I believe it's best to flag them all at
once.

Introduced here:
69a8470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants