-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If a file should be deleted, the extension updates the data in the files.delete filter (before the action happens).
This is necessary because after deletion the filesize is not available anymore (obviously!)
Problematically the deletion can be prevented afterwards by another filter or database constraint. In this case the extension-data have been already updated in the user profile.
Steps to recreate
- Add a collection with a relation to files, add a constraint to prevent the file deletion
- Move over to files and try to delete the file
- The deletion is blocked by the constraint
- The profile was already updated falsely!
Possible solutions:
- Get the data in the
files.deletefilter but only update the userprofile in the action (after deletion) - Run like this, but also store the last changes. In case the deletion does not succeed, revert them
- Open a PR to Directus to add the File-Object to the delete event (best solution!)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working