浏览代码

change from none to len of the string

Davis Phillips 6 年之前
父节点
当前提交
9cbfe9daa4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2

+ 1 - 1
roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2

@@ -18,7 +18,7 @@ items:
     resources:
       requests:
         storage: "{{ claim.capacity }}"
-{% if claim.storageclass is not none %}
+{% if claim.storageclass|length > 0 %}
     storageClassName: "{{ claim.storageclass }}"
 {% endif %}
 {% endfor %}