تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3794 أدوات العرض

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
يوليو 25
387
Search a message تم الحل
1
فبراير 25
1206
0
سبتمبر 23
2147
2
أغسطس 23
3220
2
يونيو 23
3902