From fd6e55a17b570729594674d63c5e200b15c93d04 Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Tue, 11 Jan 2022 17:11:45 +0000 Subject: [PATCH] Fix dataset abstract not being shown on the search results (#207) --- CHANGELOG.md | 2 ++ src/qgis_geonode/apiclient/geonode_v3.py | 2 +- src/qgis_geonode/gui/search_result_widget.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4b4cd98..6f27ee5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Fix dataset abstract not being shown on the UI anymore +- Updated user guide - Layer uploads also send SLD style - Connection test uses auth credentials, if available diff --git a/src/qgis_geonode/apiclient/geonode_v3.py b/src/qgis_geonode/apiclient/geonode_v3.py index 502f361f..c4262104 100644 --- a/src/qgis_geonode/apiclient/geonode_v3.py +++ b/src/qgis_geonode/apiclient/geonode_v3.py @@ -746,7 +746,7 @@ def _get_common_model_properties(raw_dataset: typing.Dict) -> typing.Dict: "uuid": uuid.UUID(raw_dataset["uuid"]), "name": raw_dataset.get("alternate", raw_dataset.get("name", "")), "title": raw_dataset.get("title", ""), - "abstract": raw_dataset.get("raw_abstract", ""), + "abstract": raw_dataset.get("raw_abstract", raw_dataset.get("abstract", "")), "thumbnail_url": raw_dataset["thumbnail_url"], "link": raw_dataset["link"], "detail_url": raw_dataset["detail_url"], diff --git a/src/qgis_geonode/gui/search_result_widget.py b/src/qgis_geonode/gui/search_result_widget.py index 8fee09d8..2d83fda7 100644 --- a/src/qgis_geonode/gui/search_result_widget.py +++ b/src/qgis_geonode/gui/search_result_widget.py @@ -124,6 +124,7 @@ def _initialize_ui_for_raster_dataset(self): def _initialize_ui(self): self.title_la.setText(f"

{self.brief_dataset.title}

") self.resource_type_la.setText(self.brief_dataset.dataset_sub_type.value) + self.description_la.setText(self.brief_dataset.abstract) if self.brief_dataset.detail_url: self.browser_btn.setIcon( QtGui.QIcon(":/plugins/qgis_geonode/mIconGeonode.svg")