Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3807 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

it works

thank you soo much

Post correlati Risposte Visualizzazioni Attività
1
lug 25
391
1
feb 25
1213
0
set 23
2154
2
ago 23
3223
2
giu 23
3913