From 8a3dc19d19dffae0f213cb1eba522c12bd73d417 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:01:24 +0100 Subject: [PATCH] Update app/Livewire/SettingsOauth.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- app/Livewire/SettingsOauth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Livewire/SettingsOauth.php b/app/Livewire/SettingsOauth.php index f17730a10..77d3b36fc 100644 --- a/app/Livewire/SettingsOauth.php +++ b/app/Livewire/SettingsOauth.php @@ -50,6 +50,10 @@ private function updateOauthSettings(?string $provider = null) $oauthData = $this->oauth_settings_map[$provider]; $oauth = OauthSetting::find($oauthData['id']); + if (!$oauth) { + throw new \Exception('OAuth setting for '.$provider.' not found. It may have been deleted.'); + } + $oauth->fill([ 'enabled' => $oauthData['enabled'], 'client_id' => $oauthData['client_id'],