Skip to content

Commit 2c6b5c3

Browse files
SK-2541 support file upload along with record creation
1 parent 09a6e14 commit 2c6b5c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

skyflow/utils/validations/_validations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,12 @@ def validate_file_upload_request(logger, request):
704704
elif table.strip() == "":
705705
raise SkyflowError(SkyflowMessages.Error.EMPTY_TABLE_VALUE.value, invalid_input_error_code)
706706

707+
# if skyflowid is present check its types string or not
707708
skyflow_id = getattr(request, "skyflow_id", None)
708709
if skyflow_id is not None and (not isinstance(skyflow_id, str)):
709710
raise SkyflowError(SkyflowMessages.Error.INAVLID_SKYFLOW_ID.value.format(type(skyflow_id)), invalid_input_error_code)
710-
711+
elif skyflow_id is not None and skyflow_id.strip() == "":
712+
raise SkyflowError(SkyflowMessages.Error.EMPTY_SKYFLOW_ID.value, invalid_input_error_code)
711713
# Column Name
712714
column_name = getattr(request, "column_name", None)
713715
if column_name is None:

0 commit comments

Comments
 (0)