[IMP] google_calendar: move credentials from res_user table to a dedicated table
Before this commit, several token related data were stored on the res_users table. During event sync, the table could be locked and this commit aims to move these data to a dedicated table to avoid bottleneck effets. Taskid: 2484335 Part-of: odoo/odoo#68700
This commit is contained in:
@@ -20,7 +20,7 @@ class GoogleAuth(http.Controller):
|
||||
if kw.get('code'):
|
||||
access_token, refresh_token, ttl = request.env['google.service']._get_google_tokens(kw['code'], service)
|
||||
# LUL TODO only defined in google_calendar
|
||||
request.env.user._set_auth_tokens(access_token, refresh_token, ttl)
|
||||
request.env.user.google_cal_account_id._set_auth_tokens(access_token, refresh_token, ttl)
|
||||
return request.redirect(url_return)
|
||||
elif kw.get('error'):
|
||||
return request.redirect("%s%s%s" % (url_return, "?error=", kw['error']))
|
||||
|
||||
Reference in New Issue
Block a user