If a trashed table is permanently deleted before an associated rows batch, the permanently_delete_marked_trash task fails
Describe the problem
If a trashed table is permanently deleted before an associated rows batch, the permanently_delete_marked_trash task fails
Steps to reproduce
Actually, this will be produced occasionally on permanently_delete_marked_trash
task, but lemme show how to reproduce by manual/programmatic actions:
- Create a table.
- Add two rows.
- Select and delete the two rows in a batch.
- Delete the table.
- Open the
database_trashedrows
table. - Mark the table row as trashed.
- Execute
permanently_delete_marked_trash
. - Mark the rows row as trashed.
- Execute
permanently_delete_marked_trash
.
Actual result
- Task fail with
TrashedRows.DoesNotExist
.
Expected result
- Task should succeed and the trash entry should be deleted.
Environment
- Baserow Version: Develop.