Browse Source

[api] Ensure skip_trash is a boolean value in the /delete API (#3958)

Harsh Gupta 10 months ago
parent
commit
afcae4c109
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/filebrowser/src/filebrowser/api.py

+ 1 - 1
apps/filebrowser/src/filebrowser/api.py

@@ -679,7 +679,7 @@ def set_replication(request):
 def rmtree(request):
   # TODO: Check if this needs to be a DELETE request
   path = request.POST.get('path')
-  skip_trash = request.POST.get('skip_trash', False)
+  skip_trash = coerce_bool(request.POST.get('skip_trash', False))
 
   request.fs.rmtree(path, skip_trash)