diff --git a/memberportal/api_spacedirectory/views.py b/memberportal/api_spacedirectory/views.py index 71576587..97d4e14a 100644 --- a/memberportal/api_spacedirectory/views.py +++ b/memberportal/api_spacedirectory/views.py @@ -60,7 +60,7 @@ def get(self, request): ## Setup the basic details sensor_details = { "name": sensor.name, - "description": sensor.description, + "description": sensor.description or "", "location": sensor.location, } @@ -83,11 +83,11 @@ def get(self, request): signout_date=None ).order_by("-signin_date") - sensor_data["total_member_count"] = {"value": spaceapi_user_count} + sensor_data["total_member_count"] = [{"value": spaceapi_user_count}] - sensor_data["people_now_present"] = { - "value": spaceapi_members_on_site.count() - } + sensor_data["people_now_present"] = [ + {"value": spaceapi_members_on_site.count()} + ] # Is the camera array empty? If not, add them if not config.SPACE_DIRECTORY_CAMS: