Commit b92e85da authored by Vincent Pelletier's avatar Vincent Pelletier

ListBox: Be more specific 'limit' values needing a cast.

Original code failed when 'limit' key is set to None.
parent 124e8d9a
......@@ -2018,7 +2018,10 @@ class ListBoxRenderer:
# Set the total number of objects.
self.total_size = sum([s.object_list_len for s in report_section_list])
self.is_sample = self.total_size == int(param_dict.get('limit', -1))
limit = param_dict.get('limit')
if isintance(limit, basestring):
limit = int(limit)
self.is_sample = self.total_size == limit
# Calculuate the start and the end offsets, and set the page numbers.
if max_lines == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment