okfn/ckanext-harvest — pull request #37 by platzhirsch (2013-05-22 15:14:30+00:00)
Title: Use integers 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.