-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When uploading a datapackage like in https://github.com/GeoNodeUserGroup-DE/contrib_datapackage/blob/main/importer_datapackage/handlers/datapackage/data/datapackage.json, the "name" of each field from the datapackage.json
will be used as name of the attribute in GeoNode. On the other hand when this attribute names etc. get uploaded to geoserver, this values get transfered to lowercases and spaces get transformed into _
.
This leads to the Bug when e.g. patching a tabular
dataset using e.g. the API, attribute descriptions get deleted, because geonode cannot match attributes synced from geoserver with the stored attribute names inside the Attributes model.
overwrite happens in when syncing with gesoserver at this helper file:
https://github.com/GeoNode/geonode/blob/842fc8870017988b5c8a22289d75fbd9420a7127/geonode/geoserver/helpers.py#L934
To reproduce this bug:
- upload valid_data.zip
geonodectl ds upload -f importer_datapackage/handlers/datapackage/data/valid_data.zip
- patch dataset in any case
geonodectl ds patch 1 --set '{ "title": "test" }'
- validate attribute table of dastaset