mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot_merge: correctly check request in handle_pr
652b1ff9ae
wanted to check if a request
was available, however it deref'd the `request` object without
checking it which is not correct: a `request` normally has an
`httprequest`, but the `request` itself might be missing if the
handler is called from e.g. a cron.
Fixes #739
This commit is contained in:
parent
a80dc25699
commit
4f237d15b0
@ -154,7 +154,7 @@ def handle_pr(env, event):
|
||||
if not branch:
|
||||
return "Not set up to care about {}:{}".format(r, b)
|
||||
|
||||
headers = request.httprequest.headers if request.httprequest else {}
|
||||
headers = request.httprequest.headers if request else {}
|
||||
_logger.info(
|
||||
"%s: %s#%s (%s) (by %s, delivery %s by %s)",
|
||||
event['action'],
|
||||
|
Loading…
Reference in New Issue
Block a user