mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 08:21:13 -05:00
use config to get default sender rather than hardcoding
this means that on non-prod envs, it reflects that environment. it needs to be a lamdba, because the column object is created at import time, when current_app.config won't have been loaded - this means that when you create a Service object, that lambda executes and grabs the correct default value
This commit is contained in:
@@ -199,7 +199,7 @@ class Service(db.Model, Versioned):
|
||||
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
|
||||
reply_to_email_address = db.Column(db.Text, index=False, unique=False, nullable=True)
|
||||
letter_contact_block = db.Column(db.Text, index=False, unique=False, nullable=True)
|
||||
sms_sender = db.Column(db.String(11), nullable=True, default='GOVUK')
|
||||
sms_sender = db.Column(db.String(11), nullable=True, default=lambda: current_app.config['FROM_NUMBER'])
|
||||
organisation_id = db.Column(UUID(as_uuid=True), db.ForeignKey('organisation.id'), index=True, nullable=True)
|
||||
organisation = db.relationship('Organisation')
|
||||
dvla_organisation_id = db.Column(
|
||||
|
||||
Reference in New Issue
Block a user