Skip to content
Myr

Always return a list from get_flashed_messages

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

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parent 915d718 · Browse files · 1 file+1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/helpers.py+1 added-1 removed
396 unmodified lines
397 if flashes is None:398 _request_ctx_stack.top.flashes = flashes = session.pop('_flashes') \399 if '_flashes' in session else []400 if category_filter:401 flashes = filter(lambda f: f[0] in category_filter, flashes)401 flashes = list(filter(lambda f: f[0] in category_filter, flashes))402 if not with_categories:403 return [x[1] for x in flashes]404 return flashes405
440 unmodified lines