Skip to content
Myr

Merge pull request #232 from sharoonthomas/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes Issue #227 where pop causes the session to be modified.

authored by Armin Ronacher · committed by Armin Ronacher · parents 7242abc, 57920a5 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:flask/helpers.py+2 added-1 removed
247 unmodified lines
248 :param with_categories: set to `True` to also receive categories.249 """250 flashes = _request_ctx_stack.top.flashes251 if flashes is None:252 _request_ctx_stack.top.flashes = flashes = session.pop('_flashes', [])252 _request_ctx_stack.top.flashes = flashes = session.pop('_flashes') \253 if '_flashes' in session else []254 if not with_categories:255 return [x[1] for x in flashes]256 return flashes257
260 unmodified lines