Skip to Content
मेन्यू
This question has been flagged
1 Reply
3793 Views

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
Discard
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

Avatar
Discard
Author

it works

thank you soo much

Related Posts Replies Views Activity
1
जुल॰ 25
387
1
फ़र॰ 25
1206
0
सित॰ 23
2147
2
अग॰ 23
3220
2
जून 23
3902