Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3789 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

it works

thank you soo much

Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
386
1
úno 25
1203
0
zář 23
2147
2
srp 23
3220
2
čvn 23
3901