okfn/ckanext-harvest — pull request #38 by platzhirsch (2013-05-27 11:17:36+00:00)
Title: Use of the integer type for api_version

CKAN uses integers for ```api_version``` checks which leads to comparisons like this:

```
>>> u'1' == 1
False
```
As spotted [here](https://github.com/okfn/ckan/blob/master/ckan/lib/dictization/model_save.py#L499). This way the wrong version will be used. Instead of dealing with type conversion the CKAN harvester can easily use integers directly.

By using the ```int()``` function when parsing the configured ```api_version``` even strings will keep working which makes it backward compatible for previous configurations.