Commit bc02ebac authored by Jim Fulton's avatar Jim Fulton

Added missing removeContext call.

parent a1fea6ff
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Document objects."""
__version__='$Revision: 1.34 $'[11:-2]
__version__='$Revision: 1.35 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog
......@@ -158,7 +158,7 @@ class DTMLDocument(PropertyManager, DTMLMethod):
security=getSecurityManager()
security.addContext(self)
try:
if client is None:
# Called as subtemplate, so don't need error propigation!
r=apply(HTML.__call__, (self, bself, REQUEST), kw)
......@@ -166,6 +166,10 @@ class DTMLDocument(PropertyManager, DTMLMethod):
return decapitate(r, RESPONSE)
r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw)
finally: security.removeContext(self)
if type(r) is not type(''): return r
if RESPONSE is None: return r
......
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