Skip to content

Commit

Permalink
Update node record after updating (#929)
Browse files Browse the repository at this point in the history
* refresh node model after updating

* update record so form is correctly filled
  • Loading branch information
Boy132 authored Jan 19, 2025
1 parent 3411e5e commit 9e8b9cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,12 @@ protected function handleRecordUpdate(Model $record, array $data): Model
try {
unset($data['unlimited_mem'], $data['unlimited_disk'], $data['unlimited_cpu']);

return $this->nodeUpdateService->handle($record, $data);
$this->record = $this->nodeUpdateService->handle($record, $data);

return $this->record;
} catch (Exception $exception) {
$this->errored = true;

Notification::make()
->title('Error connecting to the node')
->body('The configuration could not be automatically updated on Wings, you will need to manually update the configuration file.')
Expand Down

0 comments on commit 9e8b9cd

Please sign in to comment.