From 1a61c96ef463b2cfe183d138250b185907ea4bcb Mon Sep 17 00:00:00 2001 From: Valeria Bulanova Date: Mon, 27 Nov 2023 13:20:54 +0300 Subject: [PATCH] Delete useless check --- .../dl_file_uploader_api_lib/schemas/files.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/dl_file_uploader_api_lib/dl_file_uploader_api_lib/schemas/files.py b/lib/dl_file_uploader_api_lib/dl_file_uploader_api_lib/schemas/files.py index 1bb95fd42..9dc3e32e7 100644 --- a/lib/dl_file_uploader_api_lib/dl_file_uploader_api_lib/schemas/files.py +++ b/lib/dl_file_uploader_api_lib/dl_file_uploader_api_lib/schemas/files.py @@ -37,11 +37,8 @@ def validate_authorized_yadocs(data: dict) -> None: def validate_docs_data(data): if not ((data["public_link"] is None) ^ (data["private_path"] is None)): raise ValueError("Expected exactly one of [`private_path`, `public_link`] to be specified") - if data["public_link"] is None: - if data["private_path"] is None: - raise ma.ValidationError("'private_path' must be provided for private files") - elif data["oauth_token"] is None and data["connection_id"] is None: - raise ma.ValidationError("Expected `oauth_token` or `connection_id` to be specified") + if data["public_link"] is None and data["oauth_token"] is None and data["connection_id"] is None: + raise ma.ValidationError("Expected `oauth_token` or `connection_id` to be specified") class FileLinkRequestSchema(BaseRequestSchema):