Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3798 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

it works

thank you soo much

Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
389
Search a message Rozwiązane
1
lut 25
1207
0
wrz 23
2149
2
sie 23
3221
2
cze 23
3905