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

[BUG] Changing concepts with get_concepts_name_map() does not update the concepts in a model's initials #371

Closed
liunelson opened this issue Sep 20, 2024 · 1 comment

Comments

@liunelson
Copy link

I updated the context field of the concepts from model.get_concepts_name_map(). However, those changes do not propagate to the concepts from model.initials. I expected that there is a common 'pool' of concepts used by the model.templates and the model.initials since they both refer to the same state variables and I'd only need to update their context once.

@bgyori
Copy link
Member

bgyori commented Sep 23, 2024

No, each Concept instance you see in the TemplateModel is a different object instance. This is by design, and on purpose, so one cannot change a single Concept by reference and expect other Concept instances that happen to match.

@bgyori bgyori closed this as completed Sep 23, 2024
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

No branches or pull requests

2 participants