Skip to content

Commit

Permalink
Delete useless check
Browse files Browse the repository at this point in the history
  • Loading branch information
vallbull committed Nov 27, 2023
1 parent b846bcb commit 1a61c96
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 1a61c96

Please sign in to comment.