Skip to content

Commit

Permalink
take column number from the name instead of the order
Browse files Browse the repository at this point in the history
- fixes bug where columns get rearranged when one is missing
  • Loading branch information
Reedyn committed Dec 8, 2023
1 parent 40f43e5 commit 527f1a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions alma_analytics_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def __get_rows__():
iter = 0
for column, column_value in row.items():
try:
temp_row[column_names[iter]] = column_value['$']
iter = iter + 1
temp_row[column_names[int(column[-1:])-1]] = column_value['$']
except ValueError:
raise (AlmaAnalyticsException('Failed to load column number'))

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='alma_python_packages',
version='1.4.9',
version='1.4.10',
description='Python module for making requests to the Alma API',
url='https://github.com/JonkopingUniversityLibrary/almaapi',
author='Gustav Lindqvist',
Expand Down

0 comments on commit 527f1a4

Please sign in to comment.