mirror of https://github.com/django/django.git
Fixed #1048 -- Fixed AttributeError in sessions framework when SESSION_SAVE_EVERY_REQUEST is True and no cookie has been set yet. Thanks, Jiri Barton
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e0af20fb0f
commit
44e6ce6552
1
AUTHORS
1
AUTHORS
|
@ -35,6 +35,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
Andreas
|
Andreas
|
||||||
David Ascher <http://ascher.ca/>
|
David Ascher <http://ascher.ca/>
|
||||||
Arthur <avandorp@gmail.com>
|
Arthur <avandorp@gmail.com>
|
||||||
|
Jiri Barton
|
||||||
James Bennett
|
James Bennett
|
||||||
Paul Bissex <http://e-scribe.com/>
|
Paul Bissex <http://e-scribe.com/>
|
||||||
Simon Blanchard
|
Simon Blanchard
|
||||||
|
|
|
@ -69,7 +69,8 @@ class SessionMiddleware:
|
||||||
try:
|
try:
|
||||||
modified = request.session.modified
|
modified = request.session.modified
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
modified = False
|
pass
|
||||||
|
else:
|
||||||
if modified or SESSION_SAVE_EVERY_REQUEST:
|
if modified or SESSION_SAVE_EVERY_REQUEST:
|
||||||
session_key = request.session.session_key or sessions.get_new_session_key()
|
session_key = request.session.session_key or sessions.get_new_session_key()
|
||||||
new_session = sessions.save(session_key, request.session._session,
|
new_session = sessions.save(session_key, request.session._session,
|
||||||
|
|
Loading…
Reference in New Issue