Commit 408faeec authored by Titouan Soulard's avatar Titouan Soulard

matrix: use booleans for booleans (TBD ifaces)

parent 1fcced18
...@@ -96,16 +96,16 @@ class Matrix(object): ...@@ -96,16 +96,16 @@ class Matrix(object):
aq_self = aq_base(self) aq_self = aq_base(self)
if getattr(aq_self, 'index', None) is None: if getattr(aq_self, 'index', None) is None:
return 0 return False
if base_id not in self.index: if base_id not in self.index:
return 0 return False
for i in self.getCellIds(base_id=base_id): for i in self.getCellIds(base_id=base_id):
if hasattr(self, i): # We should try to use aq_self if possible but XXX if hasattr(self, i): # We should try to use aq_self if possible but XXX
return 1 return True
return 0 return False
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'hasInRange' ) 'hasInRange' )
......
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