From d73e5a2274a3bdf44821451c3ac51f1ab139da95 Mon Sep 17 00:00:00 2001 From: Jacob Gee-Clarke Date: Sat, 2 Jun 2018 22:34:01 +0100 Subject: [PATCH] Fixed my fix to fix the 500 error on /api/application/nodes when not specifying a daemon_base (#1182) --- app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php index 20a29f199..0f39fd2f8 100644 --- a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php +++ b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php @@ -74,7 +74,7 @@ class StoreNodeRequest extends ApplicationApiRequest $response = parent::validated(); $response['daemonListen'] = $response['daemon_listen']; $response['daemonSFTP'] = $response['daemon_sftp']; - $response['daemonBase'] = $response['daemon_base']; + $response['daemonBase'] = $response['daemon_base'] ?? (new Node)->getAttribute('daemonBase'); unset($response['daemon_base'], $response['daemon_listen'], $response['daemon_sftp']);