-
Notifications
You must be signed in to change notification settings - Fork 1
Remove attributes elements before fetureType insertion to avoid custom attributes checkbox set #97
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
Conversation
dd598a2 to
20d11ff
Compare
…d custom attributes checkbox set
20d11ff to
c53e36f
Compare
mki-c2c
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Great analysis of the API behaviour, clean code.
I would prefer using lxml as library for consistency. However, I am sorry about asking for this change, it's doing the work again and not sooo important.
Please decide by yourself if you would like to change the library or not.
1992b87 to
8ba2495
Compare
mki-c2c
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, I think you were able to test the corner cases, I just found some old error handling code which might never be reached, but it does not hurt
| raise ParamError( | ||
| context="dst", | ||
| key=resource_post_route, | ||
| err="Route not found. Check Workspace and datastore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally workspace should have been checked beforehand:
https://github.com/georchestra/maelstro/blob/main/backend/maelstro/core/copy_manager.py#L234
So if we get a 404 here, it should not be a problem of workspace. Probably this has become dead code thanks to the workspace check
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
…m attributes checkbox set (#97) (#98) * feat: remove attributes elements before featureType insertion to avoid custom attributes checkbox set * feat: add try except to catch featureAttributes not existing + use lxml (cherry picked from commit 44ed608) Co-authored-by: f-necas <[email protected]>
By default attributes are retrieved from source layer (even if checkbox is not set) and copied to dest layer. But It check the box by default in dest layer.
This PR aims to remove it. Solves #94
There's 2 cases:
rying to create new feature type inside the store, but no attributes were specified org.geoserver.rest.RestException 400 BAD_REQUEST: Trying to create new feature type inside the store, but no attributes were specified