folio-data-import 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of folio-data-import might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: folio_data_import
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A python module to interact with the data importing capabilities of the open-source FOLIO ILS
5
5
  License: MIT
6
6
  Author: Brooks Travis
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "folio_data_import"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A python module to interact with the data importing capabilities of the open-source FOLIO ILS"
5
5
  authors = ["Brooks Travis <brooks.travis@gmail.com>"]
6
6
  license = "MIT"
@@ -238,7 +238,7 @@ class UserImporter: # noqa: R0902
238
238
  None
239
239
  """
240
240
  mapped_departments = []
241
- for department in user_obj["departments"]:
241
+ for department in user_obj.pop("departments", []):
242
242
  try:
243
243
  mapped_departments.append(self.department_map[department])
244
244
  except KeyError:
@@ -250,7 +250,8 @@ class UserImporter: # noqa: R0902
250
250
  f'Row {line_number}: Department "{department}" not found, ' # noqa: B907
251
251
  f"excluding department from user\n"
252
252
  )
253
- user_obj["departments"] = mapped_departments
253
+ if mapped_departments:
254
+ user_obj["departments"] = mapped_departments
254
255
 
255
256
  async def update_existing_user(self, user_obj, existing_user) -> Tuple[dict, dict]:
256
257
  """