Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3809 Vues

I get email from client side and i need to check that email in respective model in server and return result from record related to that email. tried to do soo from this code but got error string index out of range. How can i solve this ?

email_add = rec['email']
records = request.env['colorvisualizer.key'].sudo().search(['email','=',email_add])
for dat in records:
email = dat.email

Avatar
Ignorer
Meilleure réponse

HI,


try with below, because you forgot 1 bracket in search.

records = request.env['colorvisualizer.key'].sudo().search([('email','=',email_add)])

Thanks & Regards,

Sunny Sheth

Avatar
Ignorer
Auteur

it works

thank you soo much

Publications associées Réponses Vues Activité
1
juil. 25
391
1
févr. 25
1213
0
sept. 23
2154
2
août 23
3223
2
juin 23
3913