An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: team error
Andras Bacsai4b2ffb456fa6
diff --git a/app/Http/Livewire/Notifications/DiscordSettings.php b/app/Http/Livewire/Notifications/DiscordSettings.phpindex 800addc24d..f39ea91759 100644--- a/app/Http/Livewire/Notifications/DiscordSettings.php+++ b/app/Http/Livewire/Notifications/DiscordSettings.php@@ -46,6 +46,7 @@ class DiscordSettings extends Componentpublic function saveModel(){$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved.');}diff --git a/app/Http/Livewire/Notifications/EmailSettings.php b/app/Http/Livewire/Notifications/EmailSettings.phpindex 33283d16b2..68c0b931b7 100644--- a/app/Http/Livewire/Notifications/EmailSettings.php+++ b/app/Http/Livewire/Notifications/EmailSettings.php@@ -62,6 +62,7 @@ class EmailSettings extends Component'team.smtp_from_name' => 'required',]);$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved successfully.');} catch (\Throwable $e) {return handleError($e, $this);@@ -81,6 +82,7 @@ class EmailSettings extends Component$this->team->smtp_enabled = false;$this->team->resend_enabled = false;$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved successfully.');} catch (\Throwable $e) {return handleError($e, $this);@@ -110,6 +112,7 @@ class EmailSettings extends Componentpublic function saveModel(){$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved.');}public function submit()@@ -127,6 +130,7 @@ class EmailSettings extends Component'team.smtp_timeout' => 'nullable',]);$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved successfully.');} catch (\Throwable $e) {$this->team->smtp_enabled = false;@@ -143,6 +147,7 @@ class EmailSettings extends Component'team.resend_api_key' => 'required']);$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved successfully.');} catch (\Throwable $e) {$this->team->resend_enabled = false;diff --git a/app/Http/Livewire/Notifications/TelegramSettings.php b/app/Http/Livewire/Notifications/TelegramSettings.phpindex b0313e1fb4..1f42000765 100644--- a/app/Http/Livewire/Notifications/TelegramSettings.php+++ b/app/Http/Livewire/Notifications/TelegramSettings.php@@ -52,6 +52,7 @@ class TelegramSettings extends Componentpublic function saveModel(){$this->team->save();+ refreshSession();$this->emit('success', 'Settings saved.');}diff --git a/app/Http/Livewire/Team/Form.php b/app/Http/Livewire/Team/Form.phpindex ba17140c4e..005a03432b 100644--- a/app/Http/Livewire/Team/Form.php+++ b/app/Http/Livewire/Team/Form.php@@ -27,6 +27,7 @@ class Form extends Component$this->validate();try {$this->team->save();+ refreshSession();} catch (\Throwable $e) {return handleError($e, $this);}diff --git a/app/Models/Team.php b/app/Models/Team.phpindex e090796d5d..6ae949d080 100644--- a/app/Models/Team.php+++ b/app/Models/Team.php@@ -21,9 +21,9 @@ class Team extends Model implements SendsDiscord, SendsEmailprotected static function booted(){- static::saved(function () {- refreshSession();- });+ // static::saved(function () {+ // refreshSession();+ // });}public function routeNotificationForDiscord()diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex 44e5d48bcb..1b0c75faa5 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -62,7 +62,7 @@ function showBoarding(): boolfunction refreshSession(?Team $team = null): void{if (!$team) {- if (auth()->user()->currentTeam()) {+ if (auth()->user()?->currentTeam()) {$team = Team::find(auth()->user()->currentTeam()->id);} else {$team = User::find(auth()->user()->id)->teams->first();diff --git a/versions.json b/versions.jsonindex 3db6ccf65d..16e56a1e96 100644--- a/versions.json+++ b/versions.json@@ -4,7 +4,7 @@"version": "3.12.36"},"v4": {- "version": "4.0.0-beta.38"+ "version": "4.0.0-beta.33"}}}