mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-27 04:09:26 +00:00
🧵(backend) improve robustness of the delete file process
* Make the call the delete celery task after the transaction this makes sure the file object is in the right state before being deleted.
This commit is contained in:
@@ -1326,7 +1326,7 @@ class FileViewSet(
|
||||
"""Delete a file completely."""
|
||||
file.soft_delete()
|
||||
file.hard_delete()
|
||||
process_file_deletion.delay(file.id)
|
||||
transaction.on_commit(lambda: process_file_deletion.delay(file.id))
|
||||
|
||||
def _authorize_subrequest(self, request, pattern):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user