Skip to content

Commit

Permalink
Merge branch 'feature/workflows' of github.com:Netflix/dispatch into …
Browse files Browse the repository at this point in the history
…feature/workflows
  • Loading branch information
kevgliss committed Oct 2, 2020
2 parents 8dc9979 + 1c3981e commit 7f8424c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dispatch/plugins/dispatch_slack/modals.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ def create_run_workflow_modal(incident_id: int, command: dict = None, db_session
slack_client,
command["channel_id"],
command["user_id"],
"No external workflow plugin.",
"No workflows enabled.",
blocks=blocks,
)

Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/workflow/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def delete(*, db_session, workflow_id: int):


def get_instance(*, db_session, instance_id: int) -> WorkflowInstance:
"""Fetches a workflow instance by it's ID."""
"""Fetches a workflow instance by its id."""
return (
db_session.query(WorkflowInstance).filter(WorkflowInstance.id == instance_id).one_or_none()
)
Expand Down
8 changes: 4 additions & 4 deletions src/dispatch/workflow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_workflows(
values: List[str] = Query(None, alias="value[]"),
):
"""
Get all documents.
Get all workflows.
"""
return search_filter_sort_paginate(
db_session=db_session,
Expand All @@ -47,7 +47,7 @@ def get_workflow(*, db_session: Session = Depends(get_db), workflow_id: int):
"""
workflow = get(db_session=db_session, workflow_id=workflow_id)
if not workflow:
raise HTTPException(status_code=404, detail="The workflow with this id does not exist.")
raise HTTPException(status_code=404, detail="A workflow with this id does not exist.")
return workflow


Expand All @@ -69,7 +69,7 @@ def update_workflow(
"""
workflow = get(db_session=db_session, workflow_id=workflow_id)
if not workflow:
raise HTTPException(status_code=404, detail="The workflow with this id does not exist.")
raise HTTPException(status_code=404, detail="A workflow with this id does not exist.")
workflow = update(db_session=db_session, workflow=workflow, workflow_in=workflow_in)
return workflow

Expand All @@ -81,5 +81,5 @@ def delete_workflow(*, db_session: Session = Depends(get_db), workflow_id: int):
"""
workflow = get(db_session=db_session, workflow_id=workflow_id)
if not workflow:
raise HTTPException(status_code=404, detail="The workflow with this id does not exist.")
raise HTTPException(status_code=404, detail="A workflow with this id does not exist.")
delete(db_session=db_session, workflow_id=workflow_id)

0 comments on commit 7f8424c

Please sign in to comment.