projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf70bde
)
[FIX] im_livechat : do not crash if not Referer url in the header of the request.
author
Jérome Maes
<jem@openerp.com>
Mon, 8 Dec 2014 16:45:16 +0000
(17:45 +0100)
committer
Jérome Maes
<jem@openerp.com>
Mon, 8 Dec 2014 16:45:24 +0000
(17:45 +0100)
addons/im_livechat/im_livechat.py
patch
|
blob
|
history
diff --git
a/addons/im_livechat/im_livechat.py
b/addons/im_livechat/im_livechat.py
index
f2ad703
..
24430e1
100644
(file)
--- a/
addons/im_livechat/im_livechat.py
+++ b/
addons/im_livechat/im_livechat.py
@@
-308,7
+308,7
@@
class LiveChatController(http.Controller):
if country_ids:
country_id = country_ids[0]
# extract url
if country_ids:
country_id = country_ids[0]
# extract url
- url = request.httprequest.headers['Referer'] or request.httprequest.base_url
+ url = request.httprequest.headers.get('Referer', False) or request.httprequest.base_url
# find the match rule for the given country and url
rule = registry.get('im_livechat.channel.rule').match_rule(cr, uid, channel_id, url, country_id, context=context)
if rule:
# find the match rule for the given country and url
rule = registry.get('im_livechat.channel.rule').match_rule(cr, uid, channel_id, url, country_id, context=context)
if rule: