Skip to content
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

Fix the bug in the Material.from_xml_element function #3278

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cn-skywalker
Copy link

Description

Fixed the error in the Material.from_xml_element function that occurred while reading the depletable attribute from the XML file.

In the original function, the script performed a forced boolean conversion on the depletable attribute in the XML, but since the value of the depletable attribute is usually a string, regardless of what the value of the depletable attribute is, it will ultimately be converted to True (even if depletable=“false” is set). This is clearly a bug. Now this bug has been fixed in this PR.

Checklist

  • [√] I have performed a self-review of my own code

  • [√] I have added tests that prove my fix is effective or that my feature works (if applicable)

@cn-skywalker cn-skywalker changed the title Fixed the error in the Material.from_xml_element function that occurred while reading the depletable attribute from the XML file. Fixed the bug in the Material.from_xml_element function that occurred while reading the depletable attribute from the XML file. Jan 25, 2025
@cn-skywalker cn-skywalker changed the title Fixed the bug in the Material.from_xml_element function that occurred while reading the depletable attribute from the XML file. Fixed the bug in the Material.from_xml_element function Jan 25, 2025
@cn-skywalker cn-skywalker changed the title Fixed the bug in the Material.from_xml_element function Fix the bug in the Material.from_xml_element function Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant