From f01341bfbf6fc65ca0b56f3d9df957da802e3928 Mon Sep 17 00:00:00 2001 From: Pritam Yadav <126752405+Pritam-Git01@users.noreply.github.com> Date: Mon, 18 Aug 2025 21:09:30 +0530 Subject: [PATCH] fix(ui): handle null values in postgres metrics (#6388) --- app/Models/StandalonePostgresql.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Models/StandalonePostgresql.php b/app/Models/StandalonePostgresql.php index 689134a32..6f1d03cc6 100644 --- a/app/Models/StandalonePostgresql.php +++ b/app/Models/StandalonePostgresql.php @@ -320,7 +320,10 @@ class StandalonePostgresql extends BaseModel } $metrics = json_decode($metrics, true); $parsedCollection = collect($metrics)->map(function ($metric) { - return [(int) $metric['time'], (float) $metric['percent']]; + return [ + (int) $metric['time'], + (float) ($metric['percent'] ?? 0.0) + ]; }); return $parsedCollection->toArray();