From 5bea1ea80a88c3fe1b5340893fcbfd963fa61ba8 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 23 Mar 2025 17:43:51 -0400 Subject: [PATCH] Fix 500 when viewing node (#1144) * Fix node 500 * this feels better * Update app/Models/Node.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> * Update app/Models/Node.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> * pint --------- Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --- app/Models/Node.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Models/Node.php b/app/Models/Node.php index 85a8053bd..0dd86b672 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -365,16 +365,20 @@ class Node extends Model implements Validatable ]; try { - $this->systemInformation(); - return Http::daemon($this) + $data = Http::daemon($this) ->connectTimeout(1) ->timeout(1) ->get('/api/system/utilization') - ->json() ?? $default; + ->json(); + + if ($data['memory_total']) { + return $data; + } } catch (Exception) { - return $default; } + + return $default; } /** @return string[] */