コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3783 ビュー

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

関連投稿 返信 ビュー 活動
1
7月 25
376
1
2月 25
1202
0
9月 23
2143
2
8月 23
3213
2
6月 23
3898