mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-04 13:40:52 -04:00
Changed styling
This commit is contained in:
@@ -308,18 +308,18 @@ def update_job_to_sent_to_dvla(self, job_id):
|
||||
|
||||
|
||||
def create_dvla_file_contents(job_id):
|
||||
file_contents = '\n'.join(
|
||||
str(LetterDVLATemplate(
|
||||
notification.template.__dict__,
|
||||
notification.personalisation,
|
||||
# This unique id is a 7 digits requested by DVLA, not known
|
||||
# if this number needs to be sequential.
|
||||
numeric_id=random.randint(1, int('9' * 7)),
|
||||
contact_block=notification.service.letter_contact_block,
|
||||
))
|
||||
for notification in dao_get_all_notifications_for_job(job_id)
|
||||
)
|
||||
return file_contents
|
||||
file_contents = '\n'.join(
|
||||
str(LetterDVLATemplate(
|
||||
notification.template.__dict__,
|
||||
notification.personalisation,
|
||||
# This unique id is a 7 digits requested by DVLA, not known
|
||||
# if this number needs to be sequential.
|
||||
numeric_id=random.randint(1, int('9' * 7)),
|
||||
contact_block=notification.service.letter_contact_block,
|
||||
))
|
||||
for notification in dao_get_all_notifications_for_job(job_id)
|
||||
)
|
||||
return file_contents
|
||||
|
||||
|
||||
def s3upload(filedata, region, bucket_name, file_location):
|
||||
|
||||
@@ -444,12 +444,12 @@ def is_delivery_slow_for_provider(
|
||||
@statsd(namespace="dao")
|
||||
@transactional
|
||||
def dao_update_notifications_sent_to_dvla(job_id, provider):
|
||||
updated_count = db.session.query(Notification
|
||||
).filter(Notification.job_id == job_id
|
||||
).update({'status': 'sending', "sent_by": provider})
|
||||
updated_count = db.session.query(
|
||||
Notification).filter(Notification.job_id == job_id).update(
|
||||
{'status': 'sending', "sent_by": provider})
|
||||
|
||||
db.session.query(NotificationHistory
|
||||
).filter(NotificationHistory.job_id == job_id
|
||||
).update({'status': 'sending', "sent_by": provider})
|
||||
db.session.query(
|
||||
NotificationHistory).filter(NotificationHistory.job_id == job_id).update(
|
||||
{'status': 'sending', "sent_by": provider})
|
||||
|
||||
return updated_count
|
||||
|
||||
@@ -283,8 +283,8 @@ class JobSchema(BaseSchema):
|
||||
job_status = field_for(models.JobStatus, 'name', required=False)
|
||||
|
||||
scheduled_for = fields.DateTime()
|
||||
service_name = fields.Nested(ServiceSchema, attribute="service", dump_to="service_name", only=["name"],
|
||||
dump_only=True)
|
||||
service_name = fields.Nested(
|
||||
ServiceSchema, attribute="service", dump_to="service_name", only=["name"], dump_only=True)
|
||||
|
||||
@validates('scheduled_for')
|
||||
def validate_scheduled_for(self, value):
|
||||
|
||||
Reference in New Issue
Block a user