Carry over the leader from the original record
authorDan Scott <dscott@laurentian.ca>
Fri, 9 Mar 2012 20:35:36 +0000 (15:35 -0500)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:57:44 +0000 (14:57 -0400)
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 <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index f80690d..625a070 100644 (file)
@@ -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