Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3808 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

it works

thank you soo much

Related Posts Răspunsuri Vizualizări Activitate
1
iul. 25
391
1
feb. 25
1213
0
sept. 23
2154
2
aug. 23
3223
2
iun. 23
3913