Skip to content

Commit

Permalink
Merge pull request #2402 from tom0827/TRACK-19
Browse files Browse the repository at this point in the history
Track 19
  • Loading branch information
tom0827 authored Sep 6, 2024
2 parents 68de363 + 63ec2d8 commit c9d84ee
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""fix dispute resolution action configuration
Revision ID: c3af13f44bed
Revises: 08209ce361c2
Create Date: 2024-09-05 13:04:27.455776
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'c3af13f44bed'
down_revision = '08209ce361c2'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute("UPDATE action_configurations SET is_active = false, is_deleted = true WHERE action_id = 10 AND (additional_params->>'work_type')::int = 15")
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
6 changes: 5 additions & 1 deletion epictrack-api/src/api/services/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,11 @@ def _process_actions(cls, event: Event, outcome_id: int = None) -> None:
action_configurations = (
db.session.query(ActionConfiguration)
.join(Action, Action.id == ActionConfiguration.action_id)
.filter(ActionConfiguration.outcome_configuration_id == outcome_id)
.filter(
ActionConfiguration.outcome_configuration_id == outcome_id and
ActionConfiguration.is_active is True and
ActionConfiguration.is_deleted is False
)
.order_by(ActionConfiguration.sort_order)
.all()
)
Expand Down

0 comments on commit c9d84ee

Please sign in to comment.