mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[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
@ -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)
|
||||
|
||||
|
@ -116,7 +116,7 @@ export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
|
||||
if (projectExists && projectId && hasPermissionToProject[projectId.toString()] === false) return <JoinProject />;
|
||||
|
||||
// check if the project info is not found.
|
||||
if (!projectExists && projectId && hasPermissionToProject[projectId.toString()] === false)
|
||||
if (!projectExists && projectId && !!hasPermissionToProject[projectId.toString()] === false)
|
||||
return (
|
||||
<div className="container grid h-screen place-items-center bg-custom-background-100">
|
||||
<EmptyState
|
||||
|
Loading…
Reference in New Issue
Block a user