Added request argument
authorThierry Florac <thierry.florac@onf.fr>
Thu, 12 Jul 2018 15:55:45 +0200
changeset 839 37c3280e6def
parent 838 bb0eec4a5689
child 840 3dcf565c711e
Added request argument
src/pyams_content/features/html/__init__.py
--- a/src/pyams_content/features/html/__init__.py	Thu Jul 12 15:54:49 2018 +0200
+++ b/src/pyams_content/features/html/__init__.py	Thu Jul 12 15:55:45 2018 +0200
@@ -24,7 +24,7 @@
 from pyramid.interfaces import IRequest
 
 # import packages
-from pyams_sequence.utility import get_reference_target
+from pyams_sequence.reference import get_reference_target
 from pyams_utils.adapter import adapter_config, ContextRequestAdapter
 from pyams_utils.registry import get_utility
 from pyams_utils.url import relative_url
@@ -42,7 +42,7 @@
             href = link.attrib['href']
             if href.startswith('oid://'):
                 oid = sequence.get_full_oid(href.split('//', 1)[1])
-                target = get_reference_target(oid)
+                target = get_reference_target(oid, request=self.request)
                 if target is not None:
                     publication_info = IWorkflowPublicationInfo(target, None)
                     if (publication_info is not None) and publication_info.is_visible(self.request):