Skip to content

Commit

Permalink
fix(enums): uncomment previous get_action_for_status_change code (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 authored Jun 28, 2024
1 parent 7cc3301 commit 319f65e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/backend/app/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,22 +225,22 @@ def is_status_change_action(task_action):

def get_action_for_status_change(task_status: TaskStatus):
"""Update task action inferred from previous state."""
return TaskAction.RELEASED_FOR_MAPPING
# match task_status:
# case TaskStatus.READY:
# return TaskAction.RELEASED_FOR_MAPPING
# case TaskStatus.LOCKED_FOR_MAPPING:
# return TaskAction.LOCKED_FOR_MAPPING
# case TaskStatus.MAPPED:
# return TaskAction.MARKED_MAPPED
# case TaskStatus.LOCKED_FOR_VALIDATION:
# return TaskAction.LOCKED_FOR_VALIDATION
# case TaskStatus.VALIDATED:
# return TaskAction.VALIDATED
# case TaskStatus.BAD:
# return TaskAction.MARKED_BAD
# case TaskStatus.SPLIT:
# return TaskAction.SPLIT_NEEDED
# return TaskAction.RELEASED_FOR_MAPPING
match task_status:
case TaskStatus.READY:
return TaskAction.RELEASED_FOR_MAPPING
case TaskStatus.LOCKED_FOR_MAPPING:
return TaskAction.LOCKED_FOR_MAPPING
case TaskStatus.MAPPED:
return TaskAction.MARKED_MAPPED
case TaskStatus.LOCKED_FOR_VALIDATION:
return TaskAction.LOCKED_FOR_VALIDATION
case TaskStatus.VALIDATED:
return TaskAction.VALIDATED
case TaskStatus.BAD:
return TaskAction.MARKED_BAD
case TaskStatus.SPLIT:
return TaskAction.SPLIT_NEEDED


class TaskType(IntEnum, Enum):
Expand Down

0 comments on commit 319f65e

Please sign in to comment.