--- a/src/pyams_default_theme/shared/common/oid.py Wed Jan 30 18:29:02 2019 +0100
+++ b/src/pyams_default_theme/shared/common/oid.py Fri Feb 01 18:33:44 2019 +0100
@@ -38,6 +38,8 @@
"""
def traverse(self, name, furtherpath=None):
+ context = self.context
+ request = self.request
if not name:
raise NotFound()
oid = name.split('::')[0]
@@ -52,9 +54,10 @@
versions = versions.get_versions(workflow.visible_states, sort=True)
if versions:
target = versions[-1]
- if (target is not None) and not IWorkflowPublicationInfo(target).is_visible(self.request):
+ if (target is not None) and not IWorkflowPublicationInfo(target).is_visible(request):
target = None
if target is not None:
- self.request.annotations[DISPLAY_CONTEXT] = self.context
+ request.annotations[DISPLAY_CONTEXT] = context
+ request.context = target
return target
raise NotFound()