Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3841 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

it works

thank you soo much

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
406
Search a message Đã xử lý
1
thg 2 25
1214
0
thg 9 23
2160
2
thg 8 23
3236
2
thg 6 23
3930