Skip to content
Snippets Groups Projects
Commit ab5d742735e5 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[views] when getting values from req.form, try casting to int (for HistogramFacet for example)

parent a5d37b0d6756
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,11 @@ ...@@ -95,7 +95,11 @@
parents_for = children_for = None parents_for = children_for = None
for key, value in self._cw.form.items(): for key, value in self._cw.form.items():
if key.startswith('es_'): if key.startswith('es_'):
facet_selections[key.replace('es_', '')] = value # FIXME TODO have better typing mechanisme (inspect facets?)
try:
facet_selections[key.replace('es_', '')] = int(value)
except ValueError:
facet_selections[key.replace('es_', '')] = value
if key == 'parents_for': if key == 'parents_for':
parents_for = value parents_for = value
if key == 'children_for': if key == 'children_for':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment