mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-10 03:14:19 -04:00
Added a boolean column to templates called is_letter_contact_blank.
If is_letter_contact_blank then the user has set the letter contact block to be blank on purpose ELSE IF is_letter_contact_blank is false THEN use the template default IF template default is blank THEN the service_letter_contact is blank use the service default
This commit is contained in:
@@ -578,6 +578,10 @@ class TemplateBase(db.Model):
|
||||
content = db.Column(db.Text, nullable=False)
|
||||
archived = db.Column(db.Boolean, nullable=False, default=False)
|
||||
subject = db.Column(db.Text)
|
||||
is_letter_contact_blank = db.Column(db.Boolean, nullable=False, default=False)
|
||||
|
||||
# if is_letter_contact = True then service_letter_contact must be null.
|
||||
CheckConstraint("Not(is_letter_contact_blank = True and service_letter_contact_id is not Null)")
|
||||
|
||||
@declared_attr
|
||||
def service_id(cls):
|
||||
|
||||
Reference in New Issue
Block a user