Commit ee58c272 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Remove _v_extra_context after render is finished.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5476 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ffb5472b
...@@ -102,7 +102,11 @@ class ProxyWidget(Widget.Widget): ...@@ -102,7 +102,11 @@ class ProxyWidget(Widget.Widget):
proxy_field._v_extra_context = {} proxy_field._v_extra_context = {}
for k, v in extra_context: for k, v in extra_context:
proxy_field._v_extra_context[k] = v proxy_field._v_extra_context[k] = v
try:
return proxy_field.widget.render(proxy_field, key, value, REQUEST) return proxy_field.widget.render(proxy_field, key, value, REQUEST)
finally:
if hasattr(proxy_field, '_v_extra_context'):
del proxy_field._v_extra_context
def render_view(self, field, value): def render_view(self, field, value):
""" """
...@@ -116,7 +120,12 @@ class ProxyWidget(Widget.Widget): ...@@ -116,7 +120,12 @@ class ProxyWidget(Widget.Widget):
proxy_field._v_extra_context = {} proxy_field._v_extra_context = {}
for k, v in extra_context: for k, v in extra_context:
proxy_field._v_extra_context[k] = v proxy_field._v_extra_context[k] = v
try:
return proxy_field.widget.render_view(proxy_field, key, value) return proxy_field.widget.render_view(proxy_field, key, value)
finally:
if hasattr(proxy_field, '_v_extra_context'):
del proxy_field._v_extra_context
class ProxyValidator(Validator.Validator): class ProxyValidator(Validator.Validator):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment