diff --git a/admin/freeposte/admin/models.py b/admin/freeposte/admin/models.py index 07c3e5b6..b9b18f68 100644 --- a/admin/freeposte/admin/models.py +++ b/admin/freeposte/admin/models.py @@ -189,7 +189,7 @@ class Alias(Email): """ domain = db.relationship(Domain, backref=db.backref('aliases', cascade='all, delete-orphan')) - wildcard = db.Column(db.Boolean(), default=False) + wildcard = db.Column(db.Boolean(), nullable=False, default=False) destination = db.Column(CommaSeparatedList, nullable=False, default=[]) diff --git a/admin/migrations/versions/c5696b48442d_.py b/admin/migrations/versions/c5696b48442d_.py index 1ca05aff..a613a267 100644 --- a/admin/migrations/versions/c5696b48442d_.py +++ b/admin/migrations/versions/c5696b48442d_.py @@ -15,7 +15,7 @@ import sqlalchemy as sa def upgrade(): - op.add_column('alias', sa.Column('wildcard', sa.Boolean(), nullable=True)) + op.add_column('alias', sa.Column('wildcard', sa.Boolean(), nullable=False, default=False)) def downgrade():