Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.6.3 #252

Merged
merged 5 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update spaceapi sensors to match schema
Pre-commit
  • Loading branch information
rechner committed Feb 27, 2024
commit 68c556cdf920e110b1ea929de30397e35981c76b
10 changes: 5 additions & 5 deletions memberportal/api_spacedirectory/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -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:
Expand Down