{"action":"closed","issue":{"url":"https://api.github.com/repos/django-oscar/django-oscar/issues/1517","labels_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/1517/labels{/name}","comments_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/1517/comments","events_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/1517/events","html_url":"https://github.com/django-oscar/django-oscar/issues/1517","id":45520167,"number":1517,"title":"`AbstractProductAttribute.save_value` does not support option groups","user":{"login":"monokrome","id":242997,"avatar_url":"https://avatars.githubusercontent.com/u/242997?v=3","gravatar_id":"","url":"https://api.github.com/users/monokrome","html_url":"https://github.com/monokrome","followers_url":"https://api.github.com/users/monokrome/followers","following_url":"https://api.github.com/users/monokrome/following{/other_user}","gists_url":"https://api.github.com/users/monokrome/gists{/gist_id}","starred_url":"https://api.github.com/users/monokrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monokrome/subscriptions","organizations_url":"https://api.github.com/users/monokrome/orgs","repos_url":"https://api.github.com/users/monokrome/repos","events_url":"https://api.github.com/users/monokrome/events{/privacy}","received_events_url":"https://api.github.com/users/monokrome/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-10-10T20:22:32Z","updated_at":"2015-07-23T22:58:10Z","closed_at":"2015-07-23T22:58:10Z","body":"I've run into an issue where something like the following doesn't work when the attribute uses an option group with Oscar 1.6.x:\r\n\r\n```python\r\nmy_attribute.save_value(my_product, 'example')\r\n```\r\n\r\nIf this is a use case which is intended to be supported, then I believe that this issue [still exists in the most recent version of Oscar][mrv] as well.\r\n\r\nSince 'example' is a valid option for this option group in this example, I would expect the call to work. Looking at the code, it seems to not take option groups into account here. The code also does not throw an error in this case, but the attribute value will not be changed. So, it seems like an error should be thrown in the case that this is not an intended use case.\r\n\r\nIs there a better method by which to solve this problem in Oscar, or is this possibly an oversight in the codebase?\r\n\r\n\r\n[mrv]: https://github.com/tangentlabs/django-oscar/blob/master/oscar/apps/catalogue/abstract_models.py#L841-L873 \"Most Recent Version\""}}