fix: handle potential null value for gender in genderLabel method
This commit is contained in:
parent
4517eeb7ee
commit
a8a7ed4c69
@ -37,7 +37,7 @@ protected function formattedBirthDate(): Attribute
|
||||
protected function genderLabel(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => $this->gender->label(),
|
||||
get: fn () => $this->gender?->label(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user