Skip to content

Commit 0e406b1

Browse files
SK-2541 make skyflow id optional in file upload
1 parent 2c6b5c3 commit 0e406b1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

skyflow/utils/validations/_validations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,7 @@ def validate_file_upload_request(logger, request):
708708
skyflow_id = getattr(request, "skyflow_id", None)
709709
if skyflow_id is not None and (not isinstance(skyflow_id, str)):
710710
raise SkyflowError(SkyflowMessages.Error.INAVLID_SKYFLOW_ID.value.format(type(skyflow_id)), invalid_input_error_code)
711-
elif skyflow_id is not None and skyflow_id.strip() == "":
712-
raise SkyflowError(SkyflowMessages.Error.EMPTY_SKYFLOW_ID.value, invalid_input_error_code)
711+
713712
# Column Name
714713
column_name = getattr(request, "column_name", None)
715714
if column_name is None:

tests/vault/controller/test__vault.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,6 @@ def test_validate_empty_skyflow_id(self):
748748
)
749749
with self.assertRaises(SkyflowError) as error:
750750
validate_file_upload_request(self.logger, request)
751-
self.assertEqual(error.exception.message,
752-
SkyflowMessages.Error.EMPTY_SKYFLOW_ID.value.format("FILE_UPLOAD"))
753751

754752
def test_validate_invalid_column_name(self):
755753
"""Test validation fails when column_name is missing"""

0 commit comments

Comments
 (0)