uchicago-library / library_website

The University of Chicago Library Website
5 stars 5 forks source link

GroupReportsPages fail after adding a report without a link #694

Closed bbusenius closed 1 year ago

bbusenius commented 1 year ago

Expected behavior

If a report is added to a GroupReportsPage and it's missing a link, it should fail to display the report gracefully without causing the page to fail.

Actual behavior

When a report is added to a GroupReportsPage the date and summary fields are required. There are three link fields which are not required because only one of them need be filled out and it could be any of them. These link fields are external_link, link_page, and link_document. If none of these link fields are filled out but a new report is added, the site will throw a fatal error on the GroupReportsPage and it's parent GroupReportsIndexPage.

Steps to reproduce

Go to a page like this one: https://looplet.lib.uchicago.edu/groups/staff-meeting/reports/2022/ (on dev) and add a report. Fill out the required fields and leave all the link fields empty. Then visit the page in a browser. Also visit the parent GroupReportsIndexPage.