Skip to content

Commit 9673df3

Browse files
committed
correct error handling and added missing deleted filter
1 parent cb5762b commit 9673df3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/backend/src/services/organizations.services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export default class OrganizationsService {
410410
throw new NotFoundException('Organization', organizationId);
411411
}
412412

413-
return organization.featuredProjects.map(projectPreviewTransformer);
413+
return organization.featuredProjects.filter((p) => !p.wbsElement.dateDeleted).map(projectPreviewTransformer);
414414
}
415415

416416
/**

src/frontend/src/pages/GuestProjectsPage/GuestProjectsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ interface ProjectCardProps {
1414
const GuestProjectsCard: React.FC<ProjectCardProps> = ({ project }) => {
1515
const theme = useTheme();
1616
const { data: singleProject, isLoading, isError, error } = useSingleProject(project.wbsNum);
17-
if (isLoading || !singleProject) return <LoadingIndicator />;
1817
if (isError) return <ErrorPage message={error.message} />;
18+
if (isLoading || !singleProject) return <LoadingIndicator />;
1919

2020
const activeWorkPackages = project.workPackages.filter((wp) => wp.status === WbsElementStatus.Active);
2121

0 commit comments

Comments
 (0)