Skip to content

Commit

Permalink
fix: update preferredLocale fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
chosww committed Dec 6, 2023
1 parent 908ea48 commit b83cf34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Models/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getSlugOptions(): SlugOptions
public function preferredLocale(): string
{
return get_written_language_for_signed_language(
User::whereBlind('email', 'email_index', $this->contact_person_email)->first()->locale
User::whereBlind('email', 'email_index', $this->contact_person_email)->first()->locale ?? locale()
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Models/RegulatedOrganization.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getSlugOptions(): SlugOptions
public function preferredLocale(): string
{
return get_written_language_for_signed_language(
User::whereBlind('email', 'email_index', $this->contact_person_email)->first()->locale
User::whereBlind('email', 'email_index', $this->contact_person_email)->first()->locale ?? locale()
);
}

Expand Down

0 comments on commit b83cf34

Please sign in to comment.