From c497bedeeea4fc3b7abc9d94700c1ef307bb6c5b Mon Sep 17 00:00:00 2001 From: Pierlou Date: Thu, 7 Nov 2024 11:45:50 +0100 Subject: [PATCH 1/3] refactor: fix preview_url and add extras --- udata/core/dataset/csv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udata/core/dataset/csv.py b/udata/core/dataset/csv.py index 4dbad46344..466a118ccd 100644 --- a/udata/core/dataset/csv.py +++ b/udata/core/dataset/csv.py @@ -90,6 +90,7 @@ class ResourcesCsvAdapter(csv.NestedAdapter): ("harvest.modified_at", lambda o: o.harvest and o.harvest.modified_at), ("schema_name", "schema.name"), ("schema_version", "schema.version"), - ("preview_url", lambda o: o.preview_url or False), + ("preview_url", lambda o: o.preview_url or None), + ("extras", lambda o: o.get("extras")), ) attribute = "resources" From 7dd259c29a4708e0b331a08d40023190ce61233e Mon Sep 17 00:00:00 2001 From: Pierlou Date: Thu, 7 Nov 2024 11:47:57 +0100 Subject: [PATCH 2/3] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717a6553dd..18cb4e8147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ * you will need https://github.com/opendatateam/udata-search-service/pull/48 - Expose the "landingPage" in DCAT RDF [#3183](https://github.com/opendatateam/udata/pull/3183) - Licence.guess: extract first URL for better matching [#3185](https://github.com/opendatateam/udata/pull/3185) +- Resource catalog: fix preview_url and add extras [#3188](https://github.com/opendatateam/udata/pull/3188) ## 9.2.4 (2024-10-22) From 5f206fc12f9e77409a6ce2c8bd238b0e13bbd006 Mon Sep 17 00:00:00 2001 From: Pierlou Date: Thu, 7 Nov 2024 11:54:14 +0100 Subject: [PATCH 3/3] fix: better get extras --- udata/core/dataset/csv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udata/core/dataset/csv.py b/udata/core/dataset/csv.py index 466a118ccd..87c6e3ddc0 100644 --- a/udata/core/dataset/csv.py +++ b/udata/core/dataset/csv.py @@ -91,6 +91,6 @@ class ResourcesCsvAdapter(csv.NestedAdapter): ("schema_name", "schema.name"), ("schema_version", "schema.version"), ("preview_url", lambda o: o.preview_url or None), - ("extras", lambda o: o.get("extras")), + ("extras", lambda o: o.extras), ) attribute = "resources"