Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
danidou committed Apr 11, 2024
1 parent 1b387c4 commit 5d644ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Resources/Badgr/AssertionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AssertionResource extends JsonResource
*/
public function toArray($request)
{
$recipient = LearnerPublicResource::make(User::where('email', '=', $this['recipient']['plaintextIdentity'])->first());
$recipient = LearnerPublicResource::make(User::where('email', '=', $this['recipient']['plaintextIdentity'])->firstOrFail());
$visibility = AssertionUser::where('assertion_id', '=', $this['entityId'])->where('user_id', '=', $recipient->id)->first();
if (!$visibility || $visibility->is_visible) {
return [
Expand Down

0 comments on commit 5d644ca

Please sign in to comment.