[FIX] website_event: return empty string in Local Events snippet if GeoIP is not installed

bzr revid: chm@openerp.com-20140327111006-ca2lbv2jxluxlw27
This commit is contained in:
chm@openerp.com 2014-03-27 12:10:06 +01:00
parent 85cdf2a990
commit ab903b9f68
1 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,8 @@ class website_event(http.Controller):
@http.route('/event/get_country_event_list', type='http', auth='public', website=True)
def get_country_events(self ,**post):
if not GeoIP:
return ""
country_obj = request.registry['res.country']
event_obj = request.registry['event.event']
cr, uid, context,event_ids = request.cr, request.uid, request.context,[]