Skip to Content
Menu
This question has been flagged
1 Atsakyti
3786 Rodiniai

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Autorius

it works

thank you soo much

Related Posts Replies Rodiniai Veikla
1
liep. 25
379
1
vas. 25
1202
0
rugs. 23
2146
2
rugp. 23
3218
2
birž. 23
3900