Let's handle the clean Evergreen schema import situation
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 19:41:31 +0000 (19:41 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 19:41:31 +0000 (19:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11369 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/import/marc2bre.pl

index c8663e3..7b90dab 100755 (executable)
@@ -93,6 +93,12 @@ if (!$recid) {
        $sth->fetch;
        $sth->finish;
        $dbh->disconnect;
+
+       # In a clean Evergreen schema, the maximum ID will be -1; but sequences
+       # have to start at 1, so handle the clean Evergreen schema situation
+       if ($recid == 0) {
+               $recid = 1;
+       }
 }
 
 my %tcn_source_map = (