fix bug in ExternalSourceInfo implementation

This commit is contained in:
Helmut Merz 2011-11-19 10:11:46 +01:00
parent 6b6ee7024d
commit a42fd38642

View file

@ -46,11 +46,11 @@ class ExternalSourceInfo(object):
def getExternalIdentifier(self):
# first try to find adapter on adapted concept or resource
adapted = adapted(self.context)
if adapted != self.context:
adaptedSourceInfo = IExternalSourceInfo(adapted, None)
adobj = adapted(self.context)
if adobj != self.context:
adaptedSourceInfo = IExternalSourceInfo(adobj, None)
if adaptedSourceInfo is not None:
return adaptedSourceInfo.getExternalIdentifier()
return adaptedSourceInfo.externalIdentifier
# otherweise use stored external identifier
return self.getSourceInfo().get('externalIdentifier')
def setExternalIdentifier(self, value):