0001-api-limit-health-API-results-to-primary-services-268.patch
hobo/rest/views.py | ||
---|---|---|
17 | 17 |
from rest_framework import generics |
18 | 18 |
from rest_framework import permissions |
19 | 19 | |
20 |
from hobo.environment.models import AVAILABLE_SERVICES
|
|
20 |
from hobo.environment.utils import get_installed_services
|
|
21 | 21 |
from hobo.rest.serializers import HealthBaseSerializer |
22 | 22 | |
23 | 23 | |
... | ... | |
26 | 26 |
permission_classes = (permissions.IsAuthenticatedOrReadOnly,) |
27 | 27 | |
28 | 28 |
def get_queryset(self): |
29 |
qs = [] |
|
30 |
for service in AVAILABLE_SERVICES: |
|
31 |
for instance in service.objects.all(): |
|
32 |
qs.append(instance) |
|
33 |
return qs |
|
29 |
return [x for x in get_installed_services() if not x.secondary] |
|
34 |
- |