{"action":"closed","issue":{"url":"https://api.github.com/repos/reubano/HDX-Age-API/issues/2","labels_url":"https://api.github.com/repos/reubano/HDX-Age-API/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/reubano/HDX-Age-API/issues/2/comments","events_url":"https://api.github.com/repos/reubano/HDX-Age-API/issues/2/events","html_url":"https://github.com/reubano/HDX-Age-API/issues/2","id":104954238,"number":2,"title":"'frequency_category' field is failing to fetch data from the categories dictionary","user":{"login":"luiscape","id":953118,"avatar_url":"https://avatars.githubusercontent.com/u/953118?v=3","gravatar_id":"","url":"https://api.github.com/users/luiscape","html_url":"https://github.com/luiscape","followers_url":"https://api.github.com/users/luiscape/followers","following_url":"https://api.github.com/users/luiscape/following{/other_user}","gists_url":"https://api.github.com/users/luiscape/gists{/gist_id}","starred_url":"https://api.github.com/users/luiscape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luiscape/subscriptions","organizations_url":"https://api.github.com/users/luiscape/orgs","repos_url":"https://api.github.com/users/luiscape/repos","events_url":"https://api.github.com/users/luiscape/events{/privacy}","received_events_url":"https://api.github.com/users/luiscape/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-04T19:23:36Z","updated_at":"2015-09-07T07:27:15Z","closed_at":"2015-09-07T07:27:15Z","body":"This seems to be a bug on line 149:\r\n\r\n```python\r\n'frequency_category': categories.get(frequency),\r\n```\r\n\r\nThe `frequency` variable comes directly from the field `data_update_frequency` on a dataset metadata. However, that field in HDX is a string. When calling a categories.get() it fails to fetch the data from the dictionary because the keys are all integers -- as they should be.\r\n\r\nI'd suggest strongly typing that variable with `int(frequency)`. That seems to solve the issue. "}}