[WEB-2092] chore: favorite delete changes (#5302)

* chore: favorite delete changes

* chore: removed deploy board deletion

* chore: favorite entity deletion
This commit is contained in:
Bavisetti Narayan 2024-08-05 17:40:49 +05:30 committed by GitHub
parent 91e4da502a
commit 07574b4222
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 64 additions and 0 deletions

View file

@ -1086,6 +1086,13 @@ class CycleViewSet(BaseViewSet):
CycleIssue.objects.filter(
cycle_id=self.kwargs.get("pk"),
).delete()
# Delete the user favorite cycle
UserFavorite.objects.filter(
user=request.user,
entity_type="cycle",
entity_identifier=pk,
project_id=project_id,
).delete()
return Response(status=status.HTTP_204_NO_CONTENT)