fixed disabled dashboard delete issue

This commit is contained in:
Cihan Şentürk 2023-10-18 16:47:56 +03:00 committed by GitHub
parent 3c582c7ffd
commit 6288651176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class DeleteDashboard extends Job implements ShouldDelete
{
// Can't delete last dashboard for any shared user
foreach ($this->model->users as $user) {
if ($user->dashboards()->enabled()->count() > 1) {
if (! $this->model->enabled || $user->dashboards()->enabled()->count() > 1) {
continue;
}