mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Use sanitised pdfs for sending and handle invalid pdfs, details below:
- pass new, sanitised pdf for sending - move invalid pdfs to a newly created bucket - set status fro notifications that failed pdf validation to a new status validation-failed - adjust existing tests
This commit is contained in:
committed by
Leo Hemsted
parent
cd563283d5
commit
e22e7245fe
28
migrations/versions/0238_add_validation_failed.py
Normal file
28
migrations/versions/0238_add_validation_failed.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0238_add_validation_failed
|
||||
Revises: 0237_add_filename_to_dvla_org
|
||||
Create Date: 2018-09-03 11:24:58.773824
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0238_add_validation_failed'
|
||||
down_revision = '0237_add_filename_to_dvla_org'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.execute("INSERT INTO notification_status_types (name) VALUES ('validation-failed')")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.execute("UPDATE notifications SET notification_status = 'permanent-failure' WHERE notification_status = 'validation-failed'")
|
||||
op.execute("UPDATE notification_history SET notification_status = 'permanent-failure' WHERE notification_status = 'validation-failed'")
|
||||
|
||||
op.execute("DELETE FROM notification_status_types WHERE name = 'validation-failed'")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user