Commit 1ebbf915 authored by Alan Mitchell's avatar Alan Mitchell

Added organizations to building information.

parent 6c237092
......@@ -365,6 +365,14 @@ def buildings(request):
'sort_order': link.sort_order}
)
b['sensors'] = sensors
# Add a list of organizations that this sensor is associated with.
orgs = []
for org in models.Organization.objects.filter(buildings=b['id']):
orgs.append(
(org.pk, org.title)
)
b['organizations'] = orgs
return b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment