diff --git a/public/site/templates/projects.json.php b/public/site/templates/projects.json.php index 6f589eb..4dd737e 100644 --- a/public/site/templates/projects.json.php +++ b/public/site/templates/projects.json.php @@ -11,11 +11,12 @@ function getProjectData($project, $user) { // Utiliser getNotificationsLight() avec cache pour optimiser les performances $notifications = []; - try { - $notifications = $project->getNotificationsLight($user); - } catch (\Throwable $e) { - error_log("Error getting notifications for project {$project->uri()}: " . $e->getMessage()); - $notifications = []; + if ($project instanceof ProjectPage) { + try { + $notifications = $project->getNotificationsLight($user); + } catch (\Throwable $e) { + error_log("Error getting notifications for project {$project->uri()}: " . $e->getMessage()); + } } $data = [