Skip to content

Commit

Permalink
#87 Fix issue where data actions would not work
Browse files Browse the repository at this point in the history
  • Loading branch information
fr.branchaud-charron committed Jun 2, 2022
1 parent 6a06811 commit 7405143
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azimuth/routers/v1/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from azimuth.task_manager import TaskManager
from azimuth.types import DatasetSplitName
from azimuth.types.tag import (
DataAction,
DataActionMapping,
DataActionResponse,
PostDataActionRequest,
Expand Down Expand Up @@ -53,6 +54,10 @@ def post_data_actions(
task_manager: TaskManager = Depends(get_task_manager),
pipeline_index: Optional[int] = Depends(query_pipeline_index),
) -> DataActionResponse:
# Remove NO_ACTION as it is only used in filtering.
for actions in request_data.data_actions.values():
actions.pop(DataAction.no_action, None)

dataset = dataset_split_managers.get(request_data.dataset_split_name)
if dataset is None:
raise HTTPException(status_code=HTTP_400_BAD_REQUEST, detail="Dataset not found.")
Expand Down

0 comments on commit 7405143

Please sign in to comment.