mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Fix server error for in-flight migration
This commit is contained in:
parent
4be05f1bf6
commit
d2e67aea19
@ -127,6 +127,9 @@ class SessionTimeoutMiddleware(object):
|
||||
|
||||
def process_response(self, request, response):
|
||||
should_skip = 'HTTP_X_WS_SESSION_QUIET' in request.META
|
||||
# Something went wrong, such as upgrade-in-progress page
|
||||
if not hasattr(request, 'session'):
|
||||
return response
|
||||
# Only update the session if it hasn't been flushed by being forced to log out.
|
||||
if request.session and not request.session.is_empty() and not should_skip:
|
||||
expiry = int(settings.SESSION_COOKIE_AGE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user