Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3859 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

it works

thank you soo much

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
443
Search a message แก้ไขแล้ว
1
ก.พ. 25
1225
0
ก.ย. 23
2172
2
ส.ค. 23
3265
2
มิ.ย. 23
3961