mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-07 00:42:34 +00:00
fix server workers 500 error
This commit is contained in:
@ -44,8 +44,10 @@ protected function getTableQuery(): Builder
|
||||
return Worker::query()
|
||||
->where('server_id', $this->server->id)
|
||||
->where(function (Builder $query): void {
|
||||
if ($this->site instanceof \App\Models\Site) {
|
||||
if ($this->site instanceof Site) {
|
||||
$query->where('site_id', $this->site->id);
|
||||
} else {
|
||||
$query->whereNull('site_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user