Commit d3d479eb authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added hasFile method based on accessors.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13730 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a98a818d
......@@ -142,6 +142,13 @@ class File(Document, CMFFile, ConversionCacheMixin):
self._setFile(data, precondition=precondition)
self.reindexObject()
security.declareProtected(Permissions.AccessContentsInformation, 'hasFile')
def hasFile(self):
"""
Checks whether a file was uploaded into the document.
"""
return self.hasData()
security.declarePrivate('_unpackData')
def _unpackData(self, data):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment