Skip to content

Commit

Permalink
Replace brain location by location field
Browse files Browse the repository at this point in the history
  • Loading branch information
anuyens committed Oct 13, 2015
1 parent 70d8383 commit 9e7443d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collective/messagesviewlet/browser/messagesviewlet.py
Expand Up @@ -34,12 +34,12 @@ def getAllMessages(self):
sort_on='getObjPositionInParent')
messages = []
for brain in brains:
if brain.location == 'homepage':
obj = brain._unrestrictedGetObject()
if obj.location == 'homepage':
# Test if context is PloneSite or its default page
if not IPloneSiteRoot.providedBy(self.context) and \
not isDefaultPage(self.portal, self.context):
continue
obj = brain._unrestrictedGetObject()
# check in the cookie if message is marked as read
if obj.can_hide:
m_uids = self.request.get('messagesviewlet', '')
Expand Down

0 comments on commit 9e7443d

Please sign in to comment.