summaryrefslogtreecommitdiff
path: root/addons/website_form/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_form/controllers')
-rw-r--r--addons/website_form/controllers/main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/website_form/controllers/main.py b/addons/website_form/controllers/main.py
index 41a120008b4..f8a75af3130 100644
--- a/addons/website_form/controllers/main.py
+++ b/addons/website_form/controllers/main.py
@@ -221,10 +221,10 @@ class WebsiteForm(http.Controller):
else:
orphan_attachment_ids.append(attachment_id.id)
- # If some attachments didn't match a field on the model,
- # we create a mail.message to link them to the record
- if orphan_attachment_ids:
- if model_name != 'mail.mail':
+ if model_name != 'mail.mail':
+ # If some attachments didn't match a field on the model,
+ # we create a mail.message to link them to the record
+ if orphan_attachment_ids:
values = {
'body': _('<p>Attached files : </p>'),
'model': model_name,