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] | ||||
|                 if k == 'relationship': | ||||
|                     critpn = crit.getPredicateName() | ||||
|                     if ((critpn.endswith('*') | ||||
|                                 and not r.getPredicateName().startswith(critpn[:-1])) | ||||
|                             and r.getPredicateName() != critpn): | ||||
|                         hit = False | ||||
|                         break | ||||
|                     if critpn.endswith('*'): | ||||
|                         if not r.getPredicateName().startswith(critpn[:-1]): | ||||
|                             hit = False; break | ||||
|                     elif r.getPredicateName() != critpn: | ||||
|                         hit = False; break | ||||
|                 else: | ||||
|                     if not hasattr(r, k) or getattr(r, k) != crit: | ||||
|                         hit = False | ||||
|                         break | ||||
|                         hit = False; break | ||||
|             if hit: | ||||
|                 result.append(r) | ||||
|         return result | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm