From 954b14a439401f6f519b1686e475449cb7bd0254 Mon Sep 17 00:00:00 2001 From: Alex Swindler Date: Fri, 20 Sep 2024 13:46:44 -0600 Subject: [PATCH] Fixed Swagger warnings --- seed/views/v3/sensors.py | 3 +++ seed/views/v3/tax_lot_properties.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/seed/views/v3/sensors.py b/seed/views/v3/sensors.py index b40240f3f9..7434cd4678 100644 --- a/seed/views/v3/sensors.py +++ b/seed/views/v3/sensors.py @@ -13,6 +13,9 @@ class SensorViewSet(generics.GenericAPIView, viewsets.ViewSet, OrgMixin, ProfileIdMixin): + # For the Swagger page, GenericAPIView asserts a value exists for `queryset` + queryset = Sensor.objects.none() + @ajax_request_class @has_perm_class("requires_member") @has_hierarchy_access(property_view_id_kwarg="property_pk") diff --git a/seed/views/v3/tax_lot_properties.py b/seed/views/v3/tax_lot_properties.py index 7d38e09f3c..2a7f5f0f65 100644 --- a/seed/views/v3/tax_lot_properties.py +++ b/seed/views/v3/tax_lot_properties.py @@ -46,6 +46,8 @@ class TaxLotPropertyViewSet(GenericViewSet, OrgMixin): viewset for any tax lot / property join API call. """ + # For the Swagger page, GenericViewSet asserts a value exists for `queryset` + queryset = TaxLotProperty.objects.none() renderer_classes = (JSONRenderer,) serializer_class = TaxLotPropertySerializer