See https://pagure.io/fedora-infrastructure/issue/12291 . Per
the traceback there, it's possible to get to end_request
without ever going through set_request, when we hit a problem
in authentication. In that case, there is no db session and we
crash assuming there is one and trying to remove it. So, let's
check it's there first.
See https://pagure.io/fedora-infrastructure/issue/12291 . Per
the traceback there, it's possible to get to
end_requestwithout ever going through
set_request, when we hit a problemin authentication. In that case, there is no db session and we
crash assuming there is one and trying to remove it. So, let's
check it's there first.
Signed-off-by: Adam Williamson awilliam@redhat.com