{"action":"created","issue":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1279","repository_url":"https://api.github.com/repos/MongoEngine/mongoengine","labels_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1279/labels{/name}","comments_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1279/comments","events_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1279/events","html_url":"https://github.com/MongoEngine/mongoengine/issues/1279","id":147196430,"number":1279,"title":"Method get_<field>display() returns incorrectly in queries","user":{"login":"ripperdoc","id":1027509,"avatar_url":"https://avatars.githubusercontent.com/u/1027509?v=3","gravatar_id":"","url":"https://api.github.com/users/ripperdoc","html_url":"https://github.com/ripperdoc","followers_url":"https://api.github.com/users/ripperdoc/followers","following_url":"https://api.github.com/users/ripperdoc/following{/other_user}","gists_url":"https://api.github.com/users/ripperdoc/gists{/gist_id}","starred_url":"https://api.github.com/users/ripperdoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripperdoc/subscriptions","organizations_url":"https://api.github.com/users/ripperdoc/orgs","repos_url":"https://api.github.com/users/ripperdoc/repos","events_url":"https://api.github.com/users/ripperdoc/events{/privacy}","received_events_url":"https://api.github.com/users/ripperdoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-04-10T05:47:36Z","updated_at":"2016-10-11T08:12:12Z","closed_at":null,"body":"I have a document called Product, and call the Mongoengine provided convenience method get_type_display() to return the correct display name of the current choice for the field \"type\".\r\n\r\nThis works when I display a single Product, but when displaying this for each Product in a QuerySet, it returns a default value for all fields. So the result is:\r\n\r\n```\r\nprint product.type => 'digital'\r\nprint product.get_type_display() => 'item'  (incorrect value)\r\nprint product._BaseDocument__get_field_display(self._fields['type'])  => 'digital' (the correct value)\r\n```\r\n\r\nI was not able to find the root cause of the error, but want to start this issue thread to get some pointers. Right now, I'm using the last line in above example as a workaround."},"comment":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/comments/252842405","html_url":"https://github.com/MongoEngine/mongoengine/issues/1279#issuecomment-252842405","issue_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1279","id":252842405,"user":{"login":"tomasgarzon","id":1880752,"avatar_url":"https://avatars.githubusercontent.com/u/1880752?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasgarzon","html_url":"https://github.com/tomasgarzon","followers_url":"https://api.github.com/users/tomasgarzon/followers","following_url":"https://api.github.com/users/tomasgarzon/following{/other_user}","gists_url":"https://api.github.com/users/tomasgarzon/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasgarzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasgarzon/subscriptions","organizations_url":"https://api.github.com/users/tomasgarzon/orgs","repos_url":"https://api.github.com/users/tomasgarzon/repos","events_url":"https://api.github.com/users/tomasgarzon/events{/privacy}","received_events_url":"https://api.github.com/users/tomasgarzon/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T08:12:12Z","updated_at":"2016-10-11T08:12:12Z","body":"Hi, I can't find this error fixed in any Pull Request, will it be included in the next release? is there any plan to fix it?"}}
{"actor":{"display_login":"tomasgarzon"}}