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):