[WEB-1608] fix: deleted project errors (#4820)
* dev: fix project not found error * [WEB-1608] chore: fix no projects found logic. --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
parent
cfbc0cf2e1
commit
d1bfed950a
2 changed files with 7 additions and 1 deletions
|
|
@ -240,6 +240,12 @@ class ProjectViewSet(BaseViewSet):
|
|||
)
|
||||
).first()
|
||||
|
||||
if project is None:
|
||||
return Response(
|
||||
{"error": "Project does not exist"},
|
||||
status=status.HTTP_404_NOT_FOUND,
|
||||
)
|
||||
|
||||
serializer = ProjectListSerializer(project)
|
||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue