Skip to content

Commit c86bc36

Browse files
committed
check for model arg
1 parent b5973e4 commit c86bc36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ads/opctl/operator/common/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class OperatorValidator(Validator):
2626

2727
def validate(self, obj_dict, **kwargs):
2828
# Model should be case insensitive
29-
obj_dict["spec"]["model"] = str(obj_dict["spec"]["model"]).lower()
29+
if "model" in obj_dict["spec"]:
30+
obj_dict["spec"]["model"] = str(obj_dict["spec"]["model"]).lower()
3031
return super().validate(obj_dict, **kwargs)
3132

3233

0 commit comments

Comments
 (0)