Repository navigation
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @mvanhorn on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
_resolve_wfs_attribute_type returns the type attribute when it is present and otherwise the base of simpleType/restriction. set_attributes_from_geoserver stores each named element that resolves to a type, and logs a warning for a named element that does not, leaving the attributes already parsed in place. Enumeration values are left unread. The new test feeds a DescribeFeatureType tree with a typed field, an enumerated string, a geometry, and a restriction with no base, and checks the three saved attributes, the preserved label and description, the warning text, and that the catalog fallback is not called. Fixes GeoNode#14681
b21ccb8 to
d7a733c
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @mvanhorn on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
|
I rebased onto master to clear a conflict in geonode/geoserver/tests/test_helpers.py (d7a733c). The new remote WMS dataset test from master and this PR's enumerated-attribute test now sit side by side, and black and flake8 pass on both changed files. The cla-bot says I'm not on file and to contact the maintainers to get added. What's the process for that here? Happy to do whatever is needed. |
After a dataset is synced from GeoServer, an attribute that only has a list of allowed values disappears. It is missing from the dataset API, the attribute table, metadata records, statistics, and the viewer attribute list, although WFS still returns the stored values. A row added by hand lasts only until the next layer update, which removes it again.
The sync builds its attribute list from the WFS 1.0.0 DescribeFeatureType document and previously kept only elements that declare a type attribute. An enumeration omits that attribute and puts the type on the base of an anonymous simpleType restriction, so the element was dropped with no log line. The update then replaces the dataset attributes from that incomplete list, deleting any row the list does not contain.
Changes:
Testing:
black --check geonode/geoserver/helpers.py geonode/geoserver/tests/test_helpers.pyreported both files already formatted.pytest -q geonode/geoserver/tests/test_helpers.pydid not run the new test; collection failed because requests could not be imported.make testdid not run the suite locally; docker-compose up failed because .env is missing. It fails the same way on upstream/master.Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.
Fixes #14681