summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-02-11 17:00:35 +0100
committerChristophe Simonis <chs@odoo.com>2019-02-11 17:00:35 +0100
commit8c29df10e02e6777840ffd7a318472de29f77dd1 (patch)
tree49c08eeab2620aa7e91e87256754763400c93376 /addons/web/controllers/main.py
parent0e71f91fa1ea8df0111d034069dcb92e27c5f0a3 (diff)
parent93d736e905e0d3b110c36ee93af341021eba42c4 (diff)
[MERGE] forward port branch saas-12.1 up to 93d736e905e
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 8cab9bc5308..59b427cfe65 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -1062,7 +1062,7 @@ class Binary(http.Controller):
filename_field=filename_field, download=download, mimetype=mimetype,
default_mimetype='image/png', access_token=access_token)
- if status != 200 and download:
+ if status == 301 or (status != 200 and download):
return request.env['ir.http']._response_by_status(status, headers, content)
if not content:
content = base64.b64encode(self.placeholder(image='placeholder.png'))