Skip to content

Commit

Permalink
there are possible obejcts w/o TG
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jul 8, 2019
1 parent f397954 commit 1d53e3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plone/app/multilingualindexes/languagefallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from Products.ZCatalog.Catalog import Catalog
from ZODB.POSException import ConflictError
from zope.component import getMultiAdapter
from zope.component import queryAdapter
from zope.globalrequest import getRequest

logger = getLogger(__name__)
Expand Down Expand Up @@ -251,7 +252,7 @@ def annotate_documentid_to_tg(event):
Thus we're able to unindex and reindex all objects in TG correctly
"""
# get TG of old object
tg = ITG(event.object)
tg = queryAdapter(event.object, ITG)
if not tg:
return
catalog = api.portal.get_tool("portal_catalog")
Expand Down

0 comments on commit 1d53e3b

Please sign in to comment.