get-models differs between OpenRefine 4.x and OpenRefine 3.x

https://groups.google.com/g/openrefine-dev/c/N6tRlDBZ05g
This commit is contained in:
Felix Lohmeier 2021-07-12 23:04:00 +02:00
parent a368147bdf
commit 1dd0cafd4e
3 changed files with 6 additions and 4 deletions

3
.gitignore vendored
View File

@ -4,7 +4,6 @@ dist
.*
openrefine_client.egg-info
refine.spec
openrefine-2.*
openrefine-3.*
openrefine-*
openrefine-client_*
tests-cli.log

View File

@ -1,4 +1,4 @@
# OpenRefine Python Client with extended command line interface
# OpenRefine Python Client with extended command line interface (⌨️ for 💎)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/43ad9bfd707b4627bd45e5c5f912a8e0)](https://www.codacy.com/gh/opencultureconsulting/openrefine-client/dashboard) [![Docker](https://img.shields.io/microbadger/image-size/felixlohmeier/openrefine-client?label=docker)](https://hub.docker.com/r/felixlohmeier/openrefine-client/) [![PyPI](https://img.shields.io/pypi/v/openrefine-client)](https://pypi.org/project/openrefine-client/) [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/felixlohmeier/openrefineder/master)

View File

@ -413,7 +413,10 @@ class RefineProject:
for i, column in enumerate(column_model['columns']):
name = column['name']
self.column_order[name] = i
try:
column_index[name] = column['cellIndex']
except KeyError:
column_index[name] = i
self.key_column = column_model['keyColumnName']
self.has_records = response['recordModel'].get('hasRecords', False)
self.rows_response_factory = RowsResponseFactory(column_index)