From c5f96fee62061cde6008351fb9c20ef02df92821 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 8 Oct 2019 18:27:09 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20:=20autorise=20blank=20pour=20message=20m?= =?UTF-8?q?ail=20adh=C3=A9sion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0064_auto_20191008_1335.py | 25 +++++++++++++++++++ preferences/models.py | 12 +++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 preferences/migrations/0064_auto_20191008_1335.py diff --git a/preferences/migrations/0064_auto_20191008_1335.py b/preferences/migrations/0064_auto_20191008_1335.py new file mode 100644 index 00000000..a1bdb9fc --- /dev/null +++ b/preferences/migrations/0064_auto_20191008_1335.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.23 on 2019-10-08 11:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0063_mandate'), + ] + + operations = [ + migrations.AlterField( + model_name='mailmessageoption', + name='welcome_mail_en', + field=models.TextField(blank=True, default='', help_text='Welcome email in English'), + ), + migrations.AlterField( + model_name='mailmessageoption', + name='welcome_mail_fr', + field=models.TextField(blank=True, default='', help_text='Welcome email in French'), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index f09e63a7..c0bd1f89 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -616,8 +616,16 @@ def homeoption_post_save(**kwargs): class MailMessageOption(AclMixin, models.Model): """Reglages, mail de bienvenue et autre""" - welcome_mail_fr = models.TextField(default="", help_text=_("Welcome email in French")) - welcome_mail_en = models.TextField(default="", help_text=_("Welcome email in English")) + welcome_mail_fr = models.TextField( + default="", + blank=True, + help_text=_("Welcome email in French") + ) + welcome_mail_en = models.TextField( + default="", + blank=True, + help_text=_("Welcome email in English") + ) class Meta: permissions = (