Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3856 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

it works

thank you soo much

Post Terkait Replies Tampilan Aktivitas
1
Jul 25
440
Search a message Diselesaikan
1
Feb 25
1224
0
Sep 23
2171
2
Agu 23
3260
2
Jun 23
3957