remove default postage from noti history

also add test for notification_history properly setting
This commit is contained in:
Leo Hemsted
2018-09-20 12:26:58 +01:00
parent 4dc3f829e3
commit 8e19a0742f
2 changed files with 6 additions and 2 deletions

View File

@@ -1436,7 +1436,7 @@ class NotificationHistory(db.Model, HistoryModel):
created_by = db.relationship('User')
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), nullable=True)
postage = db.Column(db.String, nullable=True, default='second')
postage = db.Column(db.String, nullable=True)
CheckConstraint("notification_type != 'letter' or postage in ('first', 'second')")
__table_args__ = (