app_saas处理client sec,有push就设置值,因为有可能是clone库

This commit is contained in:
Ivan Office
2025-01-26 00:14:15 +08:00
parent 7bf843efd8
commit f7d6b38078
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class ResUsers(models.Model):
if push_client_secret:
ICP = self.env['ir.config_parameter'].sudo()
ICP.set_param('app_saas_db_token', push_client_secret)
if hasattr(oauth_provider, 'client_secret') and not oauth_provider.client_secret:
if hasattr(oauth_provider, 'client_secret'):
oauth_provider.write({'client_secret': push_client_secret})
self._cr.commit()
return ret