summaryrefslogtreecommitdiff
path: root/addons/http_routing
diff options
context:
space:
mode:
authoralt-odoo <alt@odoo.com>2020-04-24 11:42:08 +0000
committeralt-odoo <alt@odoo.com>2020-04-24 14:30:17 +0000
commitd3ffc3248c18ec1b9f6c0d5e59b640f83864e3ad (patch)
tree014db0753d07ebe456dadfec2f63f55df837f9e3 /addons/http_routing
parent78007d0b56d0a15d76c959c979179fb51b021d59 (diff)
[FIX] http_routing: small fixup due to commit 423402f1e50000186924186beba0cbe87e02e774
Method _get_exception_code_values can return None value for code. We should avoid getting a KeyError in HTTP_STATUS_CODES in this case. closes odoo/odoo#50160 X-original-commit: ea138667d55b535d8ec51f86fd649e28d704ac76 Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/http_routing')
-rw-r--r--addons/http_routing/models/ir_http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/http_routing/models/ir_http.py b/addons/http_routing/models/ir_http.py
index 064665d5d15..7200c6153a8 100644
--- a/addons/http_routing/models/ir_http.py
+++ b/addons/http_routing/models/ir_http.py
@@ -588,7 +588,7 @@ class IrHttp(models.AbstractModel):
code = exception.code
values.update(
- status_message=werkzeug.http.HTTP_STATUS_CODES[code],
+ status_message=werkzeug.http.HTTP_STATUS_CODES.get(code,''),
status_code=code,
)