bijoe: style improvement

This commit is contained in:
Benjamin Dauvergne 2016-06-18 09:34:09 +02:00
parent ad831cb427
commit 6d7041c376
1 changed files with 2 additions and 1 deletions

View File

@ -28,10 +28,11 @@ class WarehouseView(TemplateView):
def get_context_data(self, **kwargs):
ctx = super(WarehouseView, self).get_context_data(**kwargs)
try:
ctx['warehouse'] = [warehouse for warehouse in get_warehouses() if warehouse.name ==
warehouse = [warehouse for warehouse in get_warehouses() if warehouse.name ==
self.kwargs['warehouse']][0]
except IndexError:
raise Http404
ctx['warehouse'] = Engine(warehouse)
return ctx