sul-dlss / libsys-airflow

Airflow DAGS for migrating and managing ILS data into FOLIO along with other LibSys workflows
Apache License 2.0
5 stars 0 forks source link

instances_from_po_lines data does not work for launch_add_979_fields task #1337

Closed shelleydoljack closed 1 month ago

shelleydoljack commented 1 month ago

The launch_add_979_fields_task currently looks for params with key "druids_for_instance_id". The data coming out of instances_from_po_lines in the digital_bookplates_instances DAG is input into the launch_add_979_fields_task but it looks like this:

{'9e2dcc32-e449-48c5-8fb4-8ec9ba34c2e3': [{'fund_name': 'KWOKB', 'druid': 'wt256zj2616', 'image_filename': 'KARKL_Kwok.jp2', 'title': 'The Bill C. P. Kwok Book Fund'}]}

https://github.com/sul-dlss/libsys-airflow/blob/d7ee828fbc9e4011e1e04e30836b90cda35cc923/libsys_airflow/plugins/digital_bookplates/bookplates.py#L168

Need to wrap in a "druids_for_instance_id" key.

shelleydoljack commented 1 month ago

We want to refactor https://github.com/sul-dlss/libsys-airflow/blob/d7ee828fbc9e4011e1e04e30836b90cda35cc923/libsys_airflow/plugins/digital_bookplates/apps/digital_bookplates_batch_upload_view.py#L22-L40 so that the digital_bookplate_instances DAG and the UI use the same function to trigger the digital_bookplate_979 DAG.