From c07211677c866e0d9e2d1fbf9dba6cf11dcba41d Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Thu, 11 Aug 2016 16:32:50 +0200 Subject: [PATCH] Fix the default value for comma separated lists --- admin/freeposte/admin/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/freeposte/admin/models.py b/admin/freeposte/admin/models.py index f234add0..c611ae47 100644 --- a/admin/freeposte/admin/models.py +++ b/admin/freeposte/admin/models.py @@ -135,7 +135,7 @@ class User(Email): # Filters forward_enabled = db.Column(db.Boolean(), nullable=False, default=False) - forward_destination = db.Column(CommaSeparatedList, nullable=True, default=None) + forward_destination = db.Column(CommaSeparatedList, nullable=True, default=[]) reply_enabled = db.Column(db.Boolean(), nullable=False, default=False) reply_subject = db.Column(db.String(255), nullable=True, default=None) reply_body = db.Column(db.Text(), nullable=True, default=None) @@ -189,7 +189,7 @@ class Alias(Email): """ domain = db.relationship(Domain, backref=db.backref('aliases', cascade='all, delete-orphan')) - destination = db.Column(CommaSeparatedList, nullable=False) + destination = db.Column(CommaSeparatedList, nullable=False, default=[]) class Fetch(Base):