Fix on DummyRelationRegistry
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1109 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
af872764f5
commit
64c4215033
1 changed files with 6 additions and 7 deletions
|
@ -87,15 +87,14 @@ class DummyRelationRegistry(object):
|
||||||
crit = criteria[k]
|
crit = criteria[k]
|
||||||
if k == 'relationship':
|
if k == 'relationship':
|
||||||
critpn = crit.getPredicateName()
|
critpn = crit.getPredicateName()
|
||||||
if ((critpn.endswith('*')
|
if critpn.endswith('*'):
|
||||||
and not r.getPredicateName().startswith(critpn[:-1]))
|
if not r.getPredicateName().startswith(critpn[:-1]):
|
||||||
and r.getPredicateName() != critpn):
|
hit = False; break
|
||||||
hit = False
|
elif r.getPredicateName() != critpn:
|
||||||
break
|
hit = False; break
|
||||||
else:
|
else:
|
||||||
if not hasattr(r, k) or getattr(r, k) != crit:
|
if not hasattr(r, k) or getattr(r, k) != crit:
|
||||||
hit = False
|
hit = False; break
|
||||||
break
|
|
||||||
if hit:
|
if hit:
|
||||||
result.append(r)
|
result.append(r)
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Reference in a new issue