Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3851 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

it works

thank you soo much

Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 25
425
1
feb 25
1220
0
sept 23
2162
2
ago 23
3247
2
jun 23
3939