Open
Conversation
When the user adds a node, the original element will be deleted. The SystemElements object cannot pass validation because a non-existing element was referenced. An error will occur. To avoid this error, I use the enumerate() method.
There was a problem hiding this comment.
Thank you so much for contributing to the open-source anaStruct project! Your contribution will help thousands of engineers work more efficiently and accuractely.
Now that you've created your first pull request here, please don't go away; take a look at the bottom of this page for the automated checks that should already be running. If they pass, great! If not, please click on 'Details' and see if you can fix the problem they've identified. A maintainer should be along shortly to review your pull request and help get it added to anaStruct!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the user adds a node, the original element will be deleted. The SystemElements object cannot pass validation because a non-existing element was referenced. A key error will occur. To avoid this error, I use the enumerate() method.
This can avoid the the key error. The original code will reference the deleted key in SystemElements.element_map.