Commit 32d982a5 authored by Okhin's avatar Okhin

Merge branch 'master' of git.laquadrature.net:la-quadrature-du-net/respect-my-net

parents 04c4cd30 9aa50de8
......@@ -10,3 +10,5 @@ nnmon.egg-info/
*.pyc
# Ignore the vim swp files
.*.swp
# Compiled messages
*.mo
......@@ -13,6 +13,6 @@ def jsonify(object):
elif object == []:
return json.dumps(object)
elif isinstance(object[0], SearchResult):
return serialize('json', [x.object for x in object])
return json.dumps([x.get_additional_fields() for x in object])
else:
return json.dumps(object)
......@@ -256,7 +256,7 @@ class LookupView(SearchView):
def get_context_data(self, *args, **kwargs):
context = super(LookupView, self).get_context_data(*args, **kwargs)
if 'object_list' in context:
context['object_list'] = [obj for obj in context['object_list'] if not obj.object.old]
context['object_list'] = [obj for obj in context['object_list'] if not obj.old]
return context
class ViolationSearchView(SearchView):
......
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