Commit 333b3708 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

docker view: only get acttive targets

parent 0345428d
......@@ -108,7 +108,7 @@ def docker(request):
filters = request.GET.dict()
if 'cmd' in filters and filters['cmd'] in ['push', 'pull', 'build']:
cmd = filters.pop('cmd')
images = models.Image.objects.filter(**filters)
images = models.Image.objects.filter(target__active=True).filter(**filters)
return HttpResponse('\n'.join([' '.join(getattr(image, cmd)()) for image in images]), content_type="text/plain")
Supports Markdown
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