Skip to content

Commit

Permalink
Potential bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PavlosIsaris committed Dec 16, 2024
1 parent 0298308 commit f7e1739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/BusinessLogicLayer/Solution/SolutionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function getFilteredSolutionsForManagement($filters): Collection {
public function getSolutions(mixed $problem_id): Collection {
$current_language_code = app()->getLocale();
$current_language = $this->languageRepository->getLanguageByCode($current_language_code);
$current_language_id = $current_language ? $current_language->id : $this->languageRepository->getDefaultLanguage()->id;
$current_language_id = ($current_language && $current_language->id) ? $current_language->id : $this->languageRepository->getDefaultLanguage()->id;

return $this->solutionRepository->getSolutions($problem_id, $current_language_id, Auth::id());
}
Expand Down

0 comments on commit f7e1739

Please sign in to comment.