summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2013-07-15 11:40:41 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2013-07-15 11:40:41 (GMT)
commit24814c393fb2559f5c19a5c4b9bb85554b1a8213 (patch)
tree9222edda0727bd0951f3c92411a147d9caffede6
parent29d4d0ced51d885970f11e9d1050279778af6165 (diff)
downloadcollective.solr-24814c393fb2559f5c19a5c4b9bb85554b1a8213.zip
collective.solr-24814c393fb2559f5c19a5c4b9bb85554b1a8213.tar.gz
collective.solr-24814c393fb2559f5c19a5c4b9bb85554b1a8213.tar.bz2
turn flare functions into properties, for better compatibility
-rw-r--r--src/collective/solr/contentlisting.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/collective/solr/contentlisting.py b/src/collective/solr/contentlisting.py
index 045b425..f99cc5d 100644
--- a/src/collective/solr/contentlisting.py
+++ b/src/collective/solr/contentlisting.py
@@ -13,6 +13,7 @@ class FlareContentListingObject(object):
def __init__(self, flare):
self.flare = flare
+ @property
def getId(self):
return self.flare.getId
@@ -42,8 +43,9 @@ class FlareContentListingObject(object):
def getSize(self):
self.flare.getObjSize
+ @property
def review_state(self):
- self.flare.review_state
+ return self.flare.review_state
def listCreators(self):
return self.flare.listCreators
@@ -92,12 +94,18 @@ class FlareContentListingObject(object):
def Rights(self):
return NotImplementedError
+ @property
def Title(self):
- return self.flare.Title
+ if type(self.flare.Title) is unicode:
+ return self.flare.Title
+ else:
+ return unicode(self.flare.Title, 'utf-8')
+ @property
def Description(self):
return self.flare.Description
+ @property
def Type(self):
return self.flare.Type
@@ -109,6 +117,7 @@ class FlareContentListingObject(object):
return self.flare.portal_type
# Temporary to workaround a bug in current plone.app.search<=1.1.0
+ @property
def portal_type(self):
return self.PortalType()