[FIX] google_drive: user_is_admin
Oversight of commit e80f1152 which causes a crash since the variable is
not defined anymore.
opw-689353
This commit is contained in:
@@ -67,7 +67,7 @@ class config(osv.Model):
|
||||
req = urllib2.Request('https://accounts.google.com/o/oauth2/token', data, headers)
|
||||
content = urllib2.urlopen(req, timeout=TIMEOUT).read()
|
||||
except urllib2.HTTPError:
|
||||
if user_is_admin:
|
||||
if self.pool['res.users']._is_admin(cr, uid, [uid]):
|
||||
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base_setup', 'action_general_configuration')
|
||||
msg = _("Something went wrong during the token generation. Please request again an authorization code .")
|
||||
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||
|
||||
Reference in New Issue
Block a user