Skip to content

Commit

Permalink
fix: Fix NPE when with empty project
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar committed Oct 23, 2023
1 parent fb2791d commit 1444d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ class ProjectWithStatsFacade(
TranslationState.UNTRANSLATED to untranslatedPercent
)
)
ProjectWithStatsView(projectWithLanguagesView, projectStatistics, languages[projectWithLanguagesView.id]!!)
ProjectWithStatsView(
view = projectWithLanguagesView,
stats = projectStatistics,
languages = languages[projectWithLanguagesView.id] ?: listOf()
)
}
val page = PageImpl(projectsWithStatsContent, projects.pageable, projects.totalElements)
return pagedWithStatsResourcesAssembler.toModel(page, projectWithStatsModelAssembler)
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/e2e/projects/leaving.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { assertMessage, confirmHardMode } from '../../common/shared';
import { projectLeavingTestData } from '../../common/apiCalls/testData/testData';
import { login } from '../../common/apiCalls/common';

describe('Projects Basics', () => {
describe('Leaving project', () => {
beforeEach(() => {
projectLeavingTestData.clean();
projectLeavingTestData.generate();
Expand Down

0 comments on commit 1444d85

Please sign in to comment.