file_manager: use get_list WebRequest method
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
07e4b2cd7a
commit
2d70511474
|
@ -619,11 +619,7 @@ class FileManager:
|
||||||
f"Cannot create archive at '{dest_path}'. Parent "
|
f"Cannot create archive at '{dest_path}'. Parent "
|
||||||
"directory does not exist."
|
"directory does not exist."
|
||||||
)
|
)
|
||||||
items: Union[str, List[str]] = web_request.get("items")
|
items = web_request.get_list("items")
|
||||||
if isinstance(items, str):
|
|
||||||
items = [
|
|
||||||
item.strip() for item in items.split(",") if item.strip()
|
|
||||||
]
|
|
||||||
if not items:
|
if not items:
|
||||||
raise self.server.error(
|
raise self.server.error(
|
||||||
"At least one file or directory must be specified"
|
"At least one file or directory must be specified"
|
||||||
|
|
Loading…
Reference in New Issue