fix bug in ExternalSourceInfo implementation
This commit is contained in:
		
							parent
							
								
									6b6ee7024d
								
							
						
					
					
						commit
						a42fd38642
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -46,11 +46,11 @@ class ExternalSourceInfo(object): | ||||||
| 
 | 
 | ||||||
|     def getExternalIdentifier(self): |     def getExternalIdentifier(self): | ||||||
|         # first try to find adapter on adapted concept or resource |         # first try to find adapter on adapted concept or resource | ||||||
|         adapted = adapted(self.context) |         adobj = adapted(self.context) | ||||||
|         if adapted != self.context: |         if adobj != self.context: | ||||||
|             adaptedSourceInfo = IExternalSourceInfo(adapted, None) |             adaptedSourceInfo = IExternalSourceInfo(adobj, None) | ||||||
|             if adaptedSourceInfo is not None: |             if adaptedSourceInfo is not None: | ||||||
|                 return adaptedSourceInfo.getExternalIdentifier() |                 return adaptedSourceInfo.externalIdentifier | ||||||
|         # otherweise use stored external identifier |         # otherweise use stored external identifier | ||||||
|         return self.getSourceInfo().get('externalIdentifier') |         return self.getSourceInfo().get('externalIdentifier') | ||||||
|     def setExternalIdentifier(self, value): |     def setExternalIdentifier(self, value): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue