Skip to content

Commit

Permalink
FOD field 300 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Nelson committed Aug 29, 2013
1 parent 25046f3 commit fcc499c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions marc_batch/jobs/fod.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ def validate300(self,marc_record):
raw_string = ''.join(field300.get_subfields('b'))
good_300b = '{0}, {1}'.format('digital',
DIGITAL_RE.sub('',raw_string).strip())
if good_300b[-1] == ',':
good_300b = good_300b[:-1]
good_300b += ' + '
if good_300b[-1] != '.':
good_300b = good_300b + '.'
last_char = good_300b[-1]
if last_char == '+':
good_300b = good_300b[:-1].strip()
if good300b[-1] == ",":
good300b =
subfield_e = field300['e']
if subfield_e is not None:
good_300b += " + "
field300.delete_subfield("b")
field300.add_subfield("b",good_300b)
field300.add_subfield("b", good_300b)
if subfield_e is not None:
field300.delete_subfield("e")
field300.add_subfield("e", subfield_e)
return marc_record


Expand Down

0 comments on commit fcc499c

Please sign in to comment.