Browse Source

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

Harsh Gupta 1 năm trước cách đây
mục cha
commit
afcae4c109
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)