Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Inventory indexing by string doesn't work #53

Open
dylanwal opened this issue Nov 1, 2022 · 1 comment
Open

Inventory indexing by string doesn't work #53

dylanwal opened this issue Nov 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dylanwal
Copy link
Contributor

dylanwal commented Nov 1, 2022

The inventory node is supposed to be able to be use index notation to get material nodes; this was broken in the latest update.

material = inventory["toluene"]

Inventory now only stores urls instead of full material nodes.

Proposed solution: get the material nodes when Inventory._generate_index_table is called.

@dylanwal dylanwal added the bug Something isn't working label Nov 3, 2022
@rjmello
Copy link
Contributor

rjmello commented Nov 3, 2022

This is happening because the default value of the get_level parameter is 0. I just created PR #55 to bump this to 1.

@rjmello rjmello self-assigned this Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants