Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3845 Представления

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
418
Search a message Решено
1
февр. 25
1216
0
сент. 23
2160
2
авг. 23
3237
2
июн. 23
3937