summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-11-04 10:35:16 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-11-04 10:35:16 +0700
commit015a2ff44f8286c36dc2c2b6dd236ddfa40ebeba (patch)
tree32b6188b1a457a3bfaa6cc8fd0969ef2ae13ce82 /indoteknik_api/controllers
parent049bf2ade70720785a49c5b7b41a431fbc932e18 (diff)
Set none when auth not in headers
Diffstat (limited to 'indoteknik_api/controllers')
-rw-r--r--indoteknik_api/controllers/controller.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py
index cb5e2363..9d0ff64e 100644
--- a/indoteknik_api/controllers/controller.py
+++ b/indoteknik_api/controllers/controller.py
@@ -22,7 +22,7 @@ class Controller(http.Controller):
request.session.authenticate(db, username, password)
return True
except:
- authorization = wsgienv['HTTP_AUTHORIZATION']
+ authorization = wsgienv['HTTP_AUTHORIZATION'] or None
token = request.env['ir.config_parameter'].sudo().get_param('rest_api_token') or ''
if authorization == token:
request.session.authenticate(config.get('db_name'), 'it@fixcomart.co.id', 'Fixcomart378')