{"action":"created","issue":{"url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/3","labels_url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/3/comments","events_url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/3/events","html_url":"https://github.com/Nothing4You/evepraisal/issues/3","id":110713710,"number":3,"title":"Issue with multiple items with the exact same name in the SDE","user":{"login":"Nothing4You","id":3694534,"avatar_url":"https://avatars.githubusercontent.com/u/3694534?v=3","gravatar_id":"","url":"https://api.github.com/users/Nothing4You","html_url":"https://github.com/Nothing4You","followers_url":"https://api.github.com/users/Nothing4You/followers","following_url":"https://api.github.com/users/Nothing4You/following{/other_user}","gists_url":"https://api.github.com/users/Nothing4You/gists{/gist_id}","starred_url":"https://api.github.com/users/Nothing4You/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nothing4You/subscriptions","organizations_url":"https://api.github.com/users/Nothing4You/orgs","repos_url":"https://api.github.com/users/Nothing4You/repos","events_url":"https://api.github.com/users/Nothing4You/events{/privacy}","received_events_url":"https://api.github.com/users/Nothing4You/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-09T18:31:52Z","updated_at":"2015-10-12T09:53:08Z","closed_at":null,"body":"In the [current SDE](https://raw.githubusercontent.com/Nothing4You/evepraisal/5c40a9fa6f7a5cddb4e682a2089043eca0371111/data/types.json) there are 2 `Drone Assembly Array` entries.\r\n```\r\n{\r\n    \"volume\": 0.0, \r\n    \"typeID\": 35879, \r\n    \"groupID\": 1415, \r\n    \"market\": false, \r\n    \"typeName\": \"Drone Assembly Array\"\r\n  },\r\n{\r\n    \"volume\": 1250.0, \r\n    \"typeID\": 24659, \r\n    \"groupID\": 397, \r\n    \"market\": true, \r\n    \"typeName\": \"Drone Assembly Array\"\r\n  },\r\n```\r\n\r\nThis leads `models.py` `get_type_by_id(typeID)` to return the first entry which isn't actively used in the game, due to the dictionary `TYPES_BY_ID = dict((t['typeID'], t) for t in TYPES)`.\r\n\r\nIdeally this should first look for items that have the `market` flag set to `true`, then fallback to items not on the market.\r\n\r\nLive example: https://evepraisal.rep.pm/e/4258"},"comment":{"url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/comments/147354771","html_url":"https://github.com/Nothing4You/evepraisal/issues/3#issuecomment-147354771","issue_url":"https://api.github.com/repos/Nothing4You/evepraisal/issues/3","id":147354771,"user":{"login":"Nothing4You","id":3694534,"avatar_url":"https://avatars.githubusercontent.com/u/3694534?v=3","gravatar_id":"","url":"https://api.github.com/users/Nothing4You","html_url":"https://github.com/Nothing4You","followers_url":"https://api.github.com/users/Nothing4You/followers","following_url":"https://api.github.com/users/Nothing4You/following{/other_user}","gists_url":"https://api.github.com/users/Nothing4You/gists{/gist_id}","starred_url":"https://api.github.com/users/Nothing4You/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nothing4You/subscriptions","organizations_url":"https://api.github.com/users/Nothing4You/orgs","repos_url":"https://api.github.com/users/Nothing4You/repos","events_url":"https://api.github.com/users/Nothing4You/events{/privacy}","received_events_url":"https://api.github.com/users/Nothing4You/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T09:53:08Z","updated_at":"2015-10-12T09:53:08Z","body":"I don't know the reasoning for this originally, but I believe that the intention for this was to also list items that are not in the market but still in the assets to be listed with unknown price.\r\n\r\nA proper way to fix this would be to first add all types that are marketable, then for all things that are not marketable fill up with the first match.\r\n\r\nThis should probably be as simple as the first hacky fix by first filling it with all types, then filling it again with just the marketable types. I'll try this later."}}