Skip to content

Commit

Permalink
[5.x] Fix error after deleting role when storing users in the database (
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Nov 7, 2024
1 parent 97bdb43 commit 0a2ec25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/Eloquent/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function explicitRoles($roles = null)
return $this->roles = $this->roles
?? (new Roles($this))->all()->map(function ($row) {
return Role::find($row->role_id);
})->keyBy->handle();
})->filter()->keyBy->handle();
}

protected function saveRoles()
Expand Down

0 comments on commit 0a2ec25

Please sign in to comment.