#5510 end_request: only remove db session if it exists (infra 12291)
Merged by ngompa. Opened by adamwill.
adamwill/pagure end-request-session-check  into  master

Download 5510.patch

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.

Signed-off-by: Adam Williamson awilliam@redhat.com

rebased onto a86c509eb0fb1f3b393ce52a42d99d879704a836

Pull-Request has been merged by ngompa

LGTM, thanks, merged!

Metadata