Skip to content

Commit

Permalink
Removing expunge_all
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Oct 17, 2024
1 parent 7060c1d commit d41eb2e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions uber/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ def with_session(*args, **kwargs):
with uber.models.Session() as session:
try:
retval = func(*args, session=session, **kwargs)
session.expunge_all()
return retval
except HTTPRedirect:
session.commit()
Expand All @@ -579,10 +578,9 @@ def render(template_name_list, data=None, encoding='utf-8'):
data = renderable_data(data)
env = JinjaEnv.env()
template = env.get_or_select_template(template_name_list)
cherrypy.response.stream = True
rendered = template.generate(data)
if encoding:
for idx, chunk in enumerate(rendered):
for chunk in rendered:
yield chunk.encode(encoding)
return rendered

Expand Down

0 comments on commit d41eb2e

Please sign in to comment.