cal-itp / benefits

Transit benefits enrollment, minus the paperwork.
https://docs.calitp.org/benefits
GNU Affero General Public License v3.0
25 stars 9 forks source link

Help page breaks when adding a new EligibilityVerifier through admin interface #2168

Closed angela-tran closed 2 weeks ago

angela-tran commented 2 weeks ago

To Reproduce

Steps to reproduce the behavior:

  1. Start with a database that has just loaded fixtures (./bin/reset_db.sh)
    • At this point, Help page works when starting from / or after choosing a transit provider
  2. Go into admin interface, and add a new EligibilityVerifier, leaving the help_template blank, which is a valid thing to do. Click Save.
  3. Add that Eligibility Verifier to one of the TransitAgencys
  4. Go to / and select that TransitAgency
  5. Click on the Help link at the bottom of the page
  6. See error

Expected behavior

The Help page should show the help sections for any of the TransitAgency's verifiers that specify a help_template.

Screenshots

DEBUG off image

DEBUG on image

Additional context

1970 introduced help_template

Django docs on null parameter on TextField: https://docs.djangoproject.com/en/5.0/ref/models/fields/#null

the Django convention is to use the empty string, not NULL

cal-itp-sentry[bot] commented 2 weeks ago

Sentry issue: BENEFITS-83