From 86f46b59cff48b0130037bd722497cdb18caf23f Mon Sep 17 00:00:00 2001 From: isUnknown Date: Thu, 22 May 2025 11:37:58 +0200 Subject: [PATCH] panel > project : fix get steps of new projects --- public/site/models/project.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/site/models/project.php b/public/site/models/project.php index 7e74452..f3b8fe1 100644 --- a/public/site/models/project.php +++ b/public/site/models/project.php @@ -7,7 +7,7 @@ class ProjectPage extends NotificationsPage { $apiCache = kirby()->cache('api'); $stepsData = $apiCache->get($this->slug() . '_' . 'steps'); - if ($stepsData === null) { + if ($stepsData === null || count($stepsData) === 0) { $steps = []; foreach ($this->children() as $child) { @@ -21,6 +21,7 @@ class ProjectPage extends NotificationsPage { usort($steps, fn($a, $b) => $a['index'] <=> $b['index']); $apiCache->set($this->slug() . '_' . 'steps', $steps); + return $steps; } else { return $stepsData;