fix indexing stuff (externalIdentifier)
This commit is contained in:
parent
37d508cec2
commit
181846b29a
2 changed files with 9 additions and 4 deletions
|
@ -463,7 +463,10 @@ class IndexAttributes(object):
|
|||
#if self.adapted != self.context:
|
||||
if isinstance(self.adapted, AdapterBase):
|
||||
#return component.queryAdapter(self.adapted, IIndexAttributes)
|
||||
return IIndexAttributes(self.adapted, None)
|
||||
iattr = IIndexAttributes(self.adapted, None)
|
||||
if iattr.__class__ == self.__class__:
|
||||
return None
|
||||
return iattr
|
||||
|
||||
def text(self):
|
||||
if self.adaptedIndexAttributes is not None:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
|
||||
# Copyright (c) 2017 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -25,7 +25,7 @@ from zope import interface, component
|
|||
from zope.interface import implements
|
||||
from zope.component import adapts
|
||||
|
||||
from loops.common import adapted
|
||||
from loops.common import adapted, AdapterBase
|
||||
from loops.interfaces import ILoopsObject
|
||||
from loops.integrator.interfaces import IExternalSourceInfo
|
||||
|
||||
|
@ -47,7 +47,9 @@ class ExternalSourceInfo(object):
|
|||
def getExternalIdentifier(self):
|
||||
# first try to find adapter on adapted concept or resource
|
||||
adobj = adapted(self.context)
|
||||
if adobj != self.context:
|
||||
#if adobj != self.context:
|
||||
#if not adobj is self.context:
|
||||
if isinstance(adobj, AdapterBase):
|
||||
adaptedSourceInfo = IExternalSourceInfo(adobj, None)
|
||||
if adaptedSourceInfo is not None:
|
||||
return adaptedSourceInfo.externalIdentifier
|
||||
|
|
Loading…
Add table
Reference in a new issue