Skip to content

Commit 527f1a4

Browse files
committed
take column number from the name instead of the order
- fixes bug where columns get rearranged when one is missing
1 parent 40f43e5 commit 527f1a4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

alma_analytics_parser/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ def __get_rows__():
4949
iter = 0
5050
for column, column_value in row.items():
5151
try:
52-
temp_row[column_names[iter]] = column_value['$']
53-
iter = iter + 1
52+
temp_row[column_names[int(column[-1:])-1]] = column_value['$']
5453
except ValueError:
5554
raise (AlmaAnalyticsException('Failed to load column number'))
5655

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup
22

33
setup(name='alma_python_packages',
4-
version='1.4.9',
4+
version='1.4.10',
55
description='Python module for making requests to the Alma API',
66
url='https://github.com/JonkopingUniversityLibrary/almaapi',
77
author='Gustav Lindqvist',

0 commit comments

Comments
 (0)