From 7cbb63677a58881047aab1b8ddeb509e8dca0253 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 9 Mar 2012 15:35:36 -0500 Subject: [PATCH] Carry over the leader from the original record We iterate over every field of the original record to create the new record. Except... the leader is not an iterable field. So we were pushing default leaders onto every new record we were creating. That is... suboptimal to the max. Signed-off-by: Dan Scott --- tools/ebooks/prep_ebook_records.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ebooks/prep_ebook_records.py b/tools/ebooks/prep_ebook_records.py index f80690d6e3..625a070d8e 100644 --- a/tools/ebooks/prep_ebook_records.py +++ b/tools/ebooks/prep_ebook_records.py @@ -308,6 +308,7 @@ def process_fields(record, options): """Decide which fields to add, delete, and keep""" new_record = pymarc.Record(to_unicode=True, force_utf8=True) + new_record.leader = record.leader add_cat_source(record, options) # 040 -- 2.11.0