Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update task_history.action correctly on db #1609

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading