[CMF-checkins] SVN: CMF/trunk/CMFCore/dtml/cachingPolicies.dtml - Use and/or instead of test(), was bombing with TypeError on Zope 2.8

Sidnei da Silva sidnei at enfoldsystems.com
Mon Dec 12 11:31:57 EST 2005


Log message for revision 40735:
  
  - Use and/or instead of test(), was bombing with TypeError on Zope 2.8
  

Changed:
  U   CMF/trunk/CMFCore/dtml/cachingPolicies.dtml

-=-
Modified: CMF/trunk/CMFCore/dtml/cachingPolicies.dtml
===================================================================
--- CMF/trunk/CMFCore/dtml/cachingPolicies.dtml	2005-12-12 16:28:09 UTC (rev 40734)
+++ CMF/trunk/CMFCore/dtml/cachingPolicies.dtml	2005-12-12 16:31:56 UTC (rev 40735)
@@ -26,8 +26,8 @@
                 e304_checked="getEnable304s() and 'checked' or ''"
                 s_max_age_secs="getSMaxAgeSecs() is not None and getSMaxAgeSecs() or ''"
                 last_modified_checked="getLastModified() and 'checked' or ''"
-                pre_check="test(getPreCheck() is None, '', getPreCheck())"
-                post_check="test(getPostCheck() is None, '', getPostCheck())">
+                pre_check="getPreCheck() is not None and getPreCheck() or ''"
+                post_check="getPostCheck() is not None and getPostCheck() or ''">
 
        <input type="hidden" name="policy_id" value="&dtml-getPolicyId;">
        <input type="hidden" name="no_cache:default:int" value="0">



More information about the CMF-checkins mailing list