Skip to content

Commit

Permalink
Removing extra validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaFrancis committed Feb 2, 2023
1 parent 59332c5 commit 889be90
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,6 @@ def to_features_list(features: Features) -> List[FeatureItem]:
]


def validate_content_size(obj: Any, rows_max_bytes: int):
if get_json_size(obj) > rows_max_bytes:
raise TooBigContentError("The first rows content after truncation exceeds the maximum size.")


class SplitFullName(TypedDict):
dataset: str
config: str
Expand Down Expand Up @@ -522,7 +517,8 @@ def compute_first_rows_response(
"rows": [],
}

validate_content_size(response_features_only, rows_max_bytes=rows_max_bytes)
if get_json_size(response_features_only) > rows_max_bytes:
raise TooBigContentError("The first rows content after truncation exceeds the maximum size.")

# get the rows
try:
Expand Down

0 comments on commit 889be90

Please sign in to comment.