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

django-bims-3466 We need to be able to colour code sites #3483

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions bims/api_views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ def process_search(self):
site_id=F('id')).values(
'site_id',
'geometry_point',
'name'
'name',
'ecosystem_type'
).query.sql_with_params()

if not self.location_sites_raw_query and self.search_query:
Expand All @@ -770,7 +771,8 @@ def process_search(self):
).annotate(site_id=F('id')).values(
'site_id',
'geometry_point',
'name'
'name',
'ecosystem_type'
).query.sql_with_params()

self.collection_records = bio
Expand Down
3 changes: 2 additions & 1 deletion bims/api_views/search_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def run_search(self):
).values(
'site_id',
'geometry_point',
'name'
'name',
'ecosystem_type'
).query.sql_with_params()

def serialize_sites(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def handle(self, *args, **options):
view_name = 'default_fbis_location_site_cluster'
query = (
'SELECT bims_locationsite.id AS site_id,'
'bims_locationsite.geometry_point, bims_locationsite.name '
'bims_locationsite.geometry_point, bims_locationsite.name, bims_locationsite.ecosystem_type '
'FROM bims_locationsite;'
)
cursor = connection.cursor()
Expand Down
Loading