Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Jul 3, 2019
1 parent a280a8f commit 8a4aad7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sc/social/like/browser/helper.py
Expand Up @@ -44,8 +44,10 @@ def plugins_enabled(self):
return configs.plugins_enabled or []

@memoize
def enabled(self, view=None):
if IFolderContentsView.providedBy(view) or not IViewView.providedBy(view):
def enabled(self, view):
if view and not IViewView.providedBy(view):
return False
if view and IFolderContentsView.providedBy(view):
return False
enabled_portal_types = self.enabled_portal_types()
return self.context.portal_type in enabled_portal_types
Expand Down

0 comments on commit 8a4aad7

Please sign in to comment.