Detect infinite recursion in Entity.to_xml
Summary
Addresses https://gitlab.indiscale.com/caosdb/customers/f-fit/management/-/issues/96 / https://gitlab.com/linkahead/linkahead-pylib/-/issues/73
When calling to_xml on an Entity that refers to itself, to_xml now detects the infinite recursion and stops after the first level of repeated information.
Focus
- What is the likelihood that a version refers to itself (predecessor / successor)? Do we need to add the same functionality to Version.to_xml?
- Does this change anything for Entities that could already successfully call to_xml before? Are there cases where this might break the communication with the server?
Test Environment
Manual Testing
Check List for the Author
-
All automated tests pass -
Reference related issues -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
Annotations in code (Gitlab comments)
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
Edited by I. Nüske