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

Assignment of a dict to to an existing node in Struct mode is raising a validation error. #586

Closed
omry opened this issue Mar 9, 2021 · 0 comments · Fixed by #587
Closed
Labels
bug Something isn't working
Milestone

Comments

@omry
Copy link
Owner

omry commented Mar 9, 2021

This should work:

def test_struct_dict_assign() -> None:
    cfg = OmegaConf.create({"a": {}})
    OmegaConf.set_struct(cfg, True)
    cfg.a = {"b": 10}
    assert cfg.a == {"b": 10}
@omry omry added the bug Something isn't working label Mar 9, 2021
@omry omry added this to the OmegaConf 2.1 milestone Mar 9, 2021
@omry omry closed this as completed in #587 Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants