Skip to content

Commit f81d087

Browse files
committed
Fixing boolean logic which requires that if an account is specified, then domain must be as well
1 parent f810908 commit f81d087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/v1alpha3/cloudstackcluster_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (r *CloudStackCluster) ValidateCreate() error {
6262
errorList = append(errorList, field.Forbidden(field.NewPath("spec", "identityRef", "kind"), "must be a Secret"))
6363
}
6464

65-
if (r.Spec.Account == "") != (r.Spec.Domain == "") {
65+
if (r.Spec.Account != "") && (r.Spec.Domain == "") {
6666
errorList = append(errorList, field.Required(field.NewPath("spec", "account"), "account and domain must be specified together"))
6767
}
6868

0 commit comments

Comments
 (0)