Skip to content

Commit bb528af

Browse files
committed
[FIX] investor_wallet_platform_base: limit template search to 1
1 parent 21b3c3a commit bb528af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

investor_wallet_platform_base/models/mail_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_email_template_by_key(self, mail_template_key, structure):
3838
template_obj = self.env['mail.template']
3939
mail_template = template_obj.search([
4040
('template_key', '=', mail_template_key),
41-
('structure', '=', structure.id)])
41+
('structure', '=', structure.id)], limit=1)
4242

4343
if not mail_template:
4444
raise ValidationError(

0 commit comments

Comments
 (0)