mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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:
parent
2d0c2eb921
commit
0b758423a4
@ -52,9 +52,9 @@ def create_wiki(file_name: str):
|
|||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def add_wiki_file(upload_file_path: str):
|
def add_wiki_file(upload_file: str):
|
||||||
"""Add an uploaded wiki file."""
|
"""Add an uploaded wiki file."""
|
||||||
upload_file_path = pathlib.Path(upload_file_path)
|
upload_file_path = pathlib.Path(upload_file)
|
||||||
temp_dir = tempfile.gettempdir()
|
temp_dir = tempfile.gettempdir()
|
||||||
if not upload_file_path.is_relative_to(temp_dir):
|
if not upload_file_path.is_relative_to(temp_dir):
|
||||||
raise Exception('Uploaded file is not in expected temp directory.')
|
raise Exception('Uploaded file is not in expected temp directory.')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user