projects
/
evergreen-equinox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Create a 001 field if it doesn't exist in marc_export
[evergreen-equinox.git]
/
Open-ILS
/
src
/
support-scripts
/
marc_export
diff --git
a/Open-ILS/src/support-scripts/marc_export
b/Open-ILS/src/support-scripts/marc_export
index
ecd79a5
..
3fe5ec1
100755
(executable)
--- a/
Open-ILS/src/support-scripts/marc_export
+++ b/
Open-ILS/src/support-scripts/marc_export
@@
-278,7
+278,12
@@
sub export_record {
if ($replace_001) {
my $tcn = $r->field('001');
- $tcn->update($id);
+ if ($tcn) {
+ $tcn->update($id);
+ } else {
+ my $new_001 = MARC::Field->new('001', $id);
+ $r->insert_fields_ordered($new_001);
+ }
}
if ($format eq 'XML') {