Pierre-Sassoulas / django-survey

A django survey app that can export results as CSV or PDF using your native language.
GNU Affero General Public License v3.0
217 stars 145 forks source link

String 'None' is displayed if category description is empty #176

Closed maximloginov closed 2 years ago

maximloginov commented 2 years ago

Value category.description is not checked against None in the template https://github.com/Pierre-Sassoulas/django-survey/blob/09a7c271c823dea598d177c2c4c4db03b7abc5f0/survey/templates/survey/survey.html#L36 It would be nicer to have something like {{category.description|default_if_none:""}} there

(I would make a PR request, but I cannot test is easily)

Pierre-Sassoulas commented 2 years ago

There's fixtures in the existing tests, you can add a null description and load the fixtures to check manually.