euscanwww: handle '' handler
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
parent
3f47a08a54
commit
e89edb588e
@ -386,12 +386,15 @@ def statistics(request):
|
||||
.annotate(n=models.Count("handler"),
|
||||
avg_conf=models.Avg("confidence"))
|
||||
)
|
||||
for i in xrange(len(handlers)):
|
||||
if not handlers[i]['handler']:
|
||||
handlers[i]['handler'] = "unknown"
|
||||
return {"handlers": handlers}
|
||||
|
||||
|
||||
@render_to("euscan/statistics_handler.html")
|
||||
def statistics_handler(request, handler):
|
||||
if handler == "None":
|
||||
if handler == "unknown":
|
||||
handler = ""
|
||||
packages = Package.objects.for_handler(handler)
|
||||
return {"handler": handler, "packages": packages}
|
||||
|
Loading…
Reference in New Issue
Block a user