Skip to content

Conversation

@jorilindell
Copy link
Collaborator

Description

When a unit authorization row is completely removed from the formset, the Guardian permission "unit:can_approve_reservation" was not being removed from the database, leaving orphaned permissions.

This fix adds handling for deleted forms by:

  • Processing formset.deleted_forms to remove permissions for deleted authorizations
  • Adding DELETE check to skip deleted forms in the main processing loop

Closes

STAM-36

When a unit authorization row is completely removed from the formset,
the Guardian permission "unit:can_approve_reservation" was not being
removed from the database, leaving orphaned permissions.

This fix adds handling for deleted forms by:
- Processing formset.deleted_forms to remove permissions for deleted authorizations
- Adding DELETE check to skip deleted forms in the main processing loop
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