1. Andrew Kou
  2. solace
Issue #5 new

Error when deleting 'flash message' after asking first question

Andrew Kou
repo owner created an issue

== Steps to reproduce: ==

  • Run setup.py develop/initdb/reset
  • Log in as user:admin pass:default
  • Go to "Ask"
  • Fill out question and submit

== The problem == In the line: {{{ UserMessage.query.filter(UserMessage.id.in_(to_delete)).delete() }}} in application.py, the default value of synchronize_session=evaluate fails.

== Traceback: == {{{

Traceback (most recent call last): File "/home/andrew/Source/projects/fitmosis/solace/scripts.py", line 57, in wsgi_app return application(a) File "/home/andrew/environments/fitmosis/lib/python2.5/site-packages/Werkzeug-0.6.2-py2.5.egg/werkzeug/wsgi.py", line 406, in call return self.app(environ, start_response) File "/home/andrew/environments/fitmosis/lib/python2.5/site-packages/Werkzeug-0.6.2-py2.5.egg/werkzeug/wrappers.py", line 245, in <lambda> return _patch_wrapper(f, lambda a: f(a[:-2]+(cls(a[-2]),))(a[-2:])) File "/home/andrew/Source/projects/fitmosis/solace/application.py", line 450, in application response = request.dispatch() File "/home/andrew/Source/projects/fitmosis/solace/application.py", line 77, in dispatch rv = self.view(self, **self.view_arguments) File "/home/andrew/Source/projects/fitmosis/solace/views/kb.py", line 210, in topic reply_form=form.as_widget()) File "/home/andrew/Source/projects/fitmosis/solace/templating.py", line 163, in render_template return template.render(context) File "/home/andrew/environments/fitmosis/lib/python2.5/site-packages/Jinja2-2.4.1-py2.5.egg/jinja2/environment.py", line 868, in render return self.environment.handle_exception(exc_info, True) File "/home/andrew/Source/projects/fitmosis/solace/templates/kb/topic.html", line 7, in top-level template code {% set page_title = topic.title %} File "/home/andrew/Source/projects/fitmosis/solace/themes/fitmosis/templates/layout.html", line 1, in top-level template code {% extends "!layout.html" %} File "/home/andrew/Source/projects/fitmosis/solace/templates/layout.html", line 91, in top-level template code {%- set messages = request.pull_flash_messages() %} File "/home/andrew/Source/projects/fitmosis/solace/application.py", line 296, in pull_flash_messages UserMessage.query.filter(UserMessage.id.in_(to_delete)).delete() File "/home/andrew/environments/fitmosis/lib/python2.5/site-packages/SQLAlchemy-0.6.0-py2.5.egg/sqlalchemy/orm/query.py", line 1839, in delete raise sa_exc.InvalidRequestError("Could not evaluate current criteria in Python. " InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.

}}}

Comments (2)

  1. Log in to comment