Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix workflow-ticket-create view
Browse files Browse the repository at this point in the history
  • Loading branch information
MJedr committed Dec 11, 2023
1 parent 7891037 commit 3b0f7a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backoffice/workflows/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def retrieve(self, request, *args, **kwargs):
def create(self, request, *args, **kwargs):
workflow_id = request.data.get("workflow_id")
ticket_type = request.data.get("ticket_type")
ticket_id = request.data.get("ticket_type")
ticket_id = request.data.get("ticket_id")

if not all([workflow_id, ticket_type, ticket_id]):
return Response(
Expand Down
5 changes: 5 additions & 0 deletions backoffice/workflows/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,9 @@ def test_create_happy_flow(self):
response = self.api_client.post(f"{TestWorkflowTicketViewSet.endpoint}/", format="json", data=data)

assert response.status_code == 201

assert "workflow_id" in response.data
assert "ticket_id" in response.data
assert "ticket_type" in response.data

assert response.data == WorkflowTicketSerializer(WorkflowTicket.objects.last()).data

0 comments on commit 3b0f7a8

Please sign in to comment.