File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/plone/app/multilingual/browser Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 2
2
from plone .app .multilingual import _
3
3
from plone .app .multilingual .interfaces import IMultiLanguageExtraOptionsSchema
4
4
from plone .app .multilingual .interfaces import ITranslationManager
5
+ from plone .app .uuid .utils import uuidToObject
5
6
from plone .base .interfaces import ILanguage
6
7
from plone .registry .interfaces import IRegistry
7
8
from plone .uuid .interfaces import IUUID
8
- from Products .CMFCore .utils import getToolByName
9
9
from Products .Five import BrowserView
10
10
from zope .component import getUtility
11
11
@@ -63,10 +63,8 @@ def __call__(self):
63
63
# try with context if no translation uid is present
64
64
manager = ITranslationManager (self .context )
65
65
else :
66
- catalog = getToolByName (self .context , "portal_catalog" )
67
- brains = catalog (UID = context_uid )
68
- if len (brains ):
69
- context = brains [0 ].getObject ()
66
+ context = uuidToObject (context_uid )
67
+ if context is not None :
70
68
manager = ITranslationManager (context )
71
69
else :
72
70
manager = ITranslationManager (self .context )
You can’t perform that action at this time.
0 commit comments