file_manager: use get_list WebRequest method

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-02-24 08:07:23 -05:00
parent 07e4b2cd7a
commit 2d70511474
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 1 additions and 5 deletions

View File

@ -619,11 +619,7 @@ class FileManager:
f"Cannot create archive at '{dest_path}'. Parent "
"directory does not exist."
)
items: Union[str, List[str]] = web_request.get("items")
if isinstance(items, str):
items = [
item.strip() for item in items.split(",") if item.strip()
]
items = web_request.get_list("items")
if not items:
raise self.server.error(
"At least one file or directory must be specified"