Ensure that jsonindex count doesn't fail for zero results

Bug #1655488 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Fix Released
Medium
Jim Fulton

Bug Description

Partial traceback:

 File "/srv/karlstaging/staging/51/eggs/karl-4.25.1-py2.7.egg/karl/views/people.py", line 764, in recent_content_view
   principals=effective_principals(request),
 File "/srv/karlstaging/staging/51/eggs/karl-4.25.1-py2.7.egg/karl/views/batch.py", line 81, in get_pg_batch
   return get_searcher_batch(searcher, context, request, kw)
 File "/srv/karlstaging/staging/51/eggs/karl-4.25.1-py2.7.egg/karl/views/batch.py", line 56, in get_searcher_batch
   total, batch = searcher(context, request, kw, batch_start, batch_size)
 File "/srv/karlstaging/staging/51/eggs/karl-4.25.1-py2.7.egg/karl/views/batch.py", line 79, in searcher
   context._p_jar, query, kw, batch_start, batch_size)
 File "/srv/karlstaging/staging/51/eggs/j1m.relstoragejsonsearch-0.2.1-py2.7.egg/j1m/relstoragejsonsearch/search.py", line 116, in search_batch
   return count, result
UnboundLocalError: local variable 'count' referenced before assignment

Tags: jsonindex
Changed in karl4:
status: New → Fix Committed
Changed in karl4:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.