org-SCAN / website

Site web du projet
6 stars 0 forks source link

fix: 🐛 [BUG] Error on showing an event without country #477

Closed create-issue-branch[bot] closed 4 months ago

create-issue-branch[bot] commented 4 months ago
Original issue description **Description of the bug** When trying to show an event that has no country linked to it, an error message shows up **Appearance of the bug** `Attempt to read property "displayed_value_content" on null` ``` [resources / views / event / show.blade.php : 75] {{ __('event/show.event_type') }} {{ $event->type->displayed_value_content }} {{ __('event/show.country') }} {{ $event->country->displayed_value_content }} {{ __('event/show.location_details') }} {{ $event->location_details }} ``` Probably just need to wrap `$event->country->displayed_value_content` in an if statement to check if the country exists first.

closes #476

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud