Skip to content

Commit

Permalink
Merge pull request #438 from weni-ai/fix/delete-queue
Browse files Browse the repository at this point in the history
fix: queue deletion
  • Loading branch information
kallilsouza authored Jan 16, 2025
2 parents 78b0e5f + 8716a97 commit 72ee596
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chats/apps/api/v1/internal/rest_clients/flows_rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def update_queue(self, uuid: str, name: str, sector_uuid: str):
)
return response

def destroy_queue(self, uuid: str, sector_uuid: str):
def destroy_queue(self, uuid: str, sector_uuid: str, project_uuid: str):
response = requests.delete(
url=f"{self.base_url}/api/v2/internals/ticketers/{sector_uuid}/queues/{uuid}/",
json={"project_uuid": project_uuid},
headers=self.headers,
)

Expand Down
1 change: 1 addition & 0 deletions chats/apps/api/v1/queues/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def perform_destroy(self, instance):
content = {
"uuid": str(instance.uuid),
"sector_uuid": str(instance.sector.uuid),
"project_uuid": str(instance.sector.project.uuid),
}

if not settings.USE_WENI_FLOWS:
Expand Down

0 comments on commit 72ee596

Please sign in to comment.