featherwiki: Fix a type check failure

Due to a reassignment to a different type.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2024-08-08 07:35:15 -07:00
parent 2d0c2eb921
commit 0b758423a4
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -52,9 +52,9 @@ def create_wiki(file_name: str):
@privileged
def add_wiki_file(upload_file_path: str):
def add_wiki_file(upload_file: str):
"""Add an uploaded wiki file."""
upload_file_path = pathlib.Path(upload_file_path)
upload_file_path = pathlib.Path(upload_file)
temp_dir = tempfile.gettempdir()
if not upload_file_path.is_relative_to(temp_dir):
raise Exception('Uploaded file is not in expected temp directory.')