File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -395,20 +395,20 @@ def convert_item(item):
395395 f"Must pass an iterable to create_data_rows. Found { type (items )} "
396396 )
397397
398+ if len (items ) > MAX_DATAROW_PER_API_OPERATION :
399+ raise MalformedQueryException (
400+ f"Cannot create more than { MAX_DATAROW_PER_API_OPERATION } DataRows per function call."
401+ )
402+
398403 # TODO: If any datarows contain metadata, we're limiting max # of datarows
399404 # until we address performance issues with datarow create with metadata
400- if ( len (items ) > MAX_DATAROW_WITH_METADATA ) :
405+ if len (items ) > MAX_DATAROW_WITH_METADATA :
401406 for row in items :
402407 if 'metadata_fields' in row :
403408 raise MalformedQueryException (
404409 f"Cannot create more than { MAX_DATAROW_WITH_METADATA } DataRows, if any DataRows contain metadata"
405410 )
406411
407- if len (items ) > MAX_DATAROW_PER_API_OPERATION :
408- raise MalformedQueryException (
409- f"Cannot create more than { MAX_DATAROW_PER_API_OPERATION } DataRows per function call."
410- )
411-
412412 with ThreadPoolExecutor (file_upload_thread_count ) as executor :
413413 futures = [executor .submit (convert_item , item ) for item in items ]
414414 items = [future .result () for future in as_completed (futures )]
You can’t perform that action at this time.
0 commit comments