Skip to content
Snippets Groups Projects
Commit 5e9fb77b authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

Merge branch 'ws1879-pims_notification_subject' into '2.8.3-DEVELOPMENT'

WS-1879 PIMS notification subject

See merge request !1586
parents 5c6835e5 f25f2a1c
No related branches found
No related tags found
2 merge requests!1607merge 2.8.3 to main,!1586WS-1879 PIMS notification subject
Pipeline #14504 passed
"""pims_notification_subject
Revision ID: f06f1976489c
Revises: 2a8ba99a1250
Create Date: 2024-02-20 10:28:45.614867
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f06f1976489c'
down_revision = '2a8ba99a1250'
branch_labels = None
depends_on = None
old_subject = """Subject: PIMS Split Workflow Finished
"""
new_subject = """Subject: PIMS Split Workflow {{#failed_splits.0}}Failed{{/failed_splits.0}}{{^failed_splits}}Finished Successfully{{/failed_splits}}
"""
def upgrade():
op.execute(
f"""
UPDATE notification_templates
SET template=replace(template, E'{old_subject}', E'{new_subject}')
WHERE name='pims_notification'
"""
)
def downgrade():
op.execute(
f"""
UPDATE notification_templates
SET template=replace(template, E'{new_subject}', E'{old_subject}')
WHERE name='pims_notification'
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment