Skip to content

Unable to Undo a delete operation for the last remaining folder/resource in a channel #4468

@akolson

Description

@akolson

Observed behavior

Undoing a delete operation for the last remaining folder/resource in a channel fails. This is a follow-up to #4116, more specifically the issue reported by @pcenov here which seems like it was never fully fixed.

Expected behavior

A user should be able to undo a delete operation for folders/resources irrespective of their position in the list.

User-facing consequences

Users are unable to undo deleted content and could lose valuable data.

Errors and logs

{
    "_e": {},
    "name": "TransactionInactiveError",
    "message": "Transaction has already completed or failed",
    "inner": null,
    "_stack": "TransactionInactiveError: Transaction has already completed or failed\n    at an._promise (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:7:3011232)\n    at Xn._transaction (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:7:3043552)\n    at Xn.transaction (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:7:3042642)\n    at TreeResource.transaction (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:10:1666)\n    at TreeResource.setData (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:10:1820)\n    at https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:10:10487\n    at https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:7:2988575\n    at Me (https://hotfixes.studio.learningequality.org/static/studio/channel_edit-03f57118f5a6eb96c6da.js:7:2983309)"
}

image

Additional information

Steps to reproduce the issue

  1. Create a channel with only one folder or resource
  2. Try to delete the resource
  3. Click the Undo button on the snackbar that appears after deleting a folder/resource

Usage Details

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions