Ticket #2900 (new defect)
snippets/package_list.html template crashes on dataset that has no 'notes'
Reported by: | seanh | Owned by: | |
---|---|---|---|
Priority: | awaiting triage | Milestone: | ckan-v1.8.1 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description
Sometimes a dataset dict comes through package_show() with 'notes': None and then the 'notes' key gets stripped from the dict when validation happens (validation only happens if there's an IDatasetForm plugin with a db_to_form_schema() method) and then package_list.html template crashes, e.g. on user profile pages.
Fix in the template? Or in the schema?
The template also crashes on packages with no tags (empty list gets stripped from dict) and probably other empty fields as well
Note: See
TracTickets for help on using
tickets.
Why does this only happen on user profile pages and not dataset search page or group read page? Looks like maybe only user profile page uses the package_list.html snippet