Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3853 Переглядів

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
432
Search a message Вирішено
1
лют. 25
1223
0
вер. 23
2167
2
серп. 23
3251
2
черв. 23
3944