From 9fcda2b273b31cdc9fc25ae9a19026c54cf984db Mon Sep 17 00:00:00 2001 From: kallimathios <147437673+kallimathios@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:42:53 -0800 Subject: [PATCH] Update build.py - added genre to transformers, added genre definition --- ils_middleware/tasks/folio/build.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ils_middleware/tasks/folio/build.py b/ils_middleware/tasks/folio/build.py index 1c672e0..8c7d692 100644 --- a/ils_middleware/tasks/folio/build.py +++ b/ils_middleware/tasks/folio/build.py @@ -223,6 +223,13 @@ def _subjects(**kwargs) -> tuple: return "subjects", subjects +def genre(**kwargs) -> tuple: + values = kwargs["values"] + genre = [] + for row in values: + genre.append(row[0]) + + def _title(**kwargs) -> tuple: values = kwargs["values"] @@ -256,6 +263,7 @@ def _user_folio_id(okapi_url: str, folio_user: str) -> str: "contributor.primary.Person": _primary_contributor, "publication": _publication, "subjects": _subjects, + "genre": _subjects, "title": _title, }