|
|
@ -33,7 +33,7 @@ class CommaSeparatedList(db.TypeDecorator):
|
|
|
|
return ",".join(value)
|
|
|
|
return ",".join(value)
|
|
|
|
|
|
|
|
|
|
|
|
def process_result_value(self, value, dialect):
|
|
|
|
def process_result_value(self, value, dialect):
|
|
|
|
return value.split(",")
|
|
|
|
return filter(bool, value.split(","))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Base(db.Model):
|
|
|
|
class Base(db.Model):
|
|
|
@ -135,7 +135,7 @@ class User(Email):
|
|
|
|
|
|
|
|
|
|
|
|
# Filters
|
|
|
|
# Filters
|
|
|
|
forward_enabled = db.Column(db.Boolean(), nullable=False, default=False)
|
|
|
|
forward_enabled = db.Column(db.Boolean(), nullable=False, default=False)
|
|
|
|
forward_destination = db.Column(db.String(255), nullable=True, default=None)
|
|
|
|
forward_destination = db.Column(CommaSeparatedList, nullable=True, default=None)
|
|
|
|
reply_enabled = db.Column(db.Boolean(), nullable=False, default=False)
|
|
|
|
reply_enabled = db.Column(db.Boolean(), nullable=False, default=False)
|
|
|
|
reply_subject = db.Column(db.String(255), nullable=True, default=None)
|
|
|
|
reply_subject = db.Column(db.String(255), nullable=True, default=None)
|
|
|
|
reply_body = db.Column(db.Text(), nullable=True, default=None)
|
|
|
|
reply_body = db.Column(db.Text(), nullable=True, default=None)
|
|
|
|