projects
/
evergreen
/
joelewis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d74649d
)
LP#1152753: fix fake FK trigger on vandelay.import_item
author
Galen Charlton
<gmc@equinoxinitiative.org>
Fri, 1 Sep 2017 21:22:42 +0000
(17:22 -0400)
committer
Mike Rylander
<mrylander@gmail.com>
Fri, 1 Sep 2017 21:17:47 +0000
(17:17 -0400)
Fixes a regression caught by live_t/0824.item_import_defaults.pg
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/800.fkeys.sql
patch
|
blob
|
history
diff --git
a/Open-ILS/src/sql/Pg/800.fkeys.sql
b/Open-ILS/src/sql/Pg/800.fkeys.sql
index
8ae7d26
..
1ee6ead
100644
(file)
--- a/
Open-ILS/src/sql/Pg/800.fkeys.sql
+++ b/
Open-ILS/src/sql/Pg/800.fkeys.sql
@@
-110,6
+110,9
@@
ALTER TABLE serial.unit ADD CONSTRAINT serial_unit_editor_fkey FOREIGN KEY (edit
CREATE OR REPLACE FUNCTION evergreen.vandelay_import_item_imported_as_inh_fkey() RETURNS TRIGGER AS $f$
BEGIN
+ IF NEW.imported_as IS NULL THEN
+ RETURN NEW;
+ END IF;
PERFORM 1 FROM asset.copy WHERE id = NEW.imported_as;
IF NOT FOUND THEN
RAISE foreign_key_violation USING MESSAGE = FORMAT(