-
Notifications
You must be signed in to change notification settings - Fork 13
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
XML2D - multivalue keys #52
Comments
I've commited some changes that should capture when elements are not added as a list when they need to be, this needed to be done in the recursive update as well as the adding new keys in case an existing element is replaced with a non-list value. I've also added a line that restores the xmltree in cases of errors. Also needed to update one of the tests to add elements as a list. |
I had to change my code from floodmodeller-api/toolbox/Model Conversion/tuflow/component_converter.py Lines 255 to 264 in b3b4a0e
floodmodeller-api/toolbox/Model Conversion/tuflow/component_converter.py Lines 255 to 264 in bf87626
|
I think the
except
part might need some sort of warning infloodmodeller-api/floodmodeller_api/xml2d.py
Lines 347 to 355 in 3ef6361
I was trying to set the
link1d
attribute but didn't realise it was inself._multi_value_keys
so this would always fail silently, resulting in the links being completely absent in the saved xml file.I realise this is kind of implied by:
floodmodeller-api/docs/source/user_guide/xml2d.rst
Lines 29 to 30 in 3ef6361
and
floodmodeller-api/docs/source/user_guide/xml2d.rst
Lines 47 to 49 in 3ef6361
but it could be clearer.
The text was updated successfully, but these errors were encountered: