Commit 1c32b1eb authored by Nicolas Delaby's avatar Nicolas Delaby

Simplify code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35220 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4423aee4
...@@ -1113,12 +1113,10 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S ...@@ -1113,12 +1113,10 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S
""" """
Converts the subject of the document to a textual representation. Converts the subject of the document to a textual representation.
""" """
subject = self.getSubject() subject = self.getSubject('')
if not subject: if not subject:
# XXX not sure if this fallback is a good idea. # XXX not sure if this fallback is a good idea.
subject = self.getTitle() subject = self.getTitle('')
if subject is None:
subject = ''
return str(subject) return str(subject)
security.declareProtected(Permissions.View, 'asText') security.declareProtected(Permissions.View, 'asText')
......
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