Jelajahi Sumber

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

Harsh Gupta 10 bulan lalu
induk
melakukan
afcae4c109
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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):
 def rmtree(request):
   # TODO: Check if this needs to be a DELETE request
   # TODO: Check if this needs to be a DELETE request
   path = request.POST.get('path')
   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)
   request.fs.rmtree(path, skip_trash)