CORD-1244 cleanup use of get_tenant/get_service
Change-Id: Iae02c3d73d64a105dadade3e64f73cad885c34fa
diff --git a/xos/api/service/exampleservice.py b/xos/api/service/exampleservice.py
index d8fe23a..467a4bd 100644
--- a/xos/api/service/exampleservice.py
+++ b/xos/api/service/exampleservice.py
@@ -36,7 +36,7 @@
base_name = "exampleservice"
method_name = "exampleservice"
method_kind = "viewset"
- queryset = ExampleService.get_service_objects().all()
+ queryset = ExampleService.objects.all()
serializer_class = ExampleServiceSerializer
@classmethod
diff --git a/xos/api/tenant/exampletenant.py b/xos/api/tenant/exampletenant.py
index f4778cc..386a77e 100644
--- a/xos/api/tenant/exampletenant.py
+++ b/xos/api/tenant/exampletenant.py
@@ -12,14 +12,14 @@
from services.exampleservice.models import ExampleTenant, ExampleService
def get_default_example_service():
- example_services = ExampleService.get_service_objects().all()
+ example_services = ExampleService.objects.all()
if example_services:
return example_services[0]
return None
class ExampleTenantSerializer(PlusModelSerializer):
id = ReadOnlyField()
- provider_service = serializers.PrimaryKeyRelatedField(queryset=ExampleService.get_service_objects().all(), default=get_default_example_service)
+ provider_service = serializers.PrimaryKeyRelatedField(queryset=ExampleService.objects.all(), default=get_default_example_service)
tenant_message = serializers.CharField(required=False)
backend_status = ReadOnlyField()
@@ -36,7 +36,7 @@
base_name = "exampletenant"
method_name = "exampletenant"
method_kind = "viewset"
- queryset = ExampleTenant.get_tenant_objects().all()
+ queryset = ExampleTenant.objects.all()
serializer_class = ExampleTenantSerializer
@classmethod