cal-itp / benefits

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

Fix: verifier help templates #2169

Closed angela-tran closed 3 months ago

angela-tran commented 3 months ago

This PR fixes #2168 by making sure the context variable agency.help_templates doesn't include empty strings.

The logic previously did not consider the case where the admin interface populates the help_template as an empty string rather than None. If you load an EligibilityVerifier fixture that doesn't specify help_template, the field gets set as None.

github-actions[bot] commented 3 months ago

Coverage report

This PR does not seem to contain any modification to coverable code.

angela-tran commented 3 months ago

The Help page on dev-benefits.calitp.org was not working with MST as the selected transit provider because its CalFresh verifier had no help_template. I added core/includes/help--calfresh.html as the help_template to fix that. This fix is still important though because any time the admin interface saves/updates an EligibilityVerifier with an empty help_template, it'll be saved back as an empty string.