[CMF-checkins] CVS: CMF/CMFDefault - DublinCore.py:1.19.4.1

Tres Seaver tseaver@zope.com
Mon, 22 Jul 2002 19:22:17 -0400


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv19385/CMFDefault

Modified Files:
      Tag: CMF-1_3-branch
	DublinCore.py 
Log Message:
 - Harden stringified date methods for forward compatibility.

=== CMF/CMFDefault/DublinCore.py 1.19 => 1.19.4.1 ===
         """
             Dublin Core element - date resource becomes effective.
         """
-        return self.effective_date and self.effective_date.ISO() or 'None'
+        ed = getattr( self, 'effective_date', None )
+        return ed and ed.ISO() or 'None'
 
     security.declarePublic( 'ExpirationDate' )
     def ExpirationDate( self ):
         """
             Dublin Core element - date resource expires.
         """
-        return self.expiration_date and self.expiration_date.ISO() or 'None'
+        ed = getattr( self, 'expiration_date', None )
+        return ed and ed.ISO() or 'None'
 
     security.declarePublic( 'ModificationDate' )
     def ModificationDate( self ):