We need to actually decode the json...
authorMike Rylander <mrylander@gmail.com>
Thu, 30 Jan 2014 18:06:33 +0000 (13:06 -0500)
committerMike Rylander <mrylander@gmail.com>
Thu, 30 Jan 2014 18:06:33 +0000 (13:06 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/upgrade/ZZZZ.function.composite_compiler.sql

index 82ddcf9..411693d 100644 (file)
@@ -299,7 +299,7 @@ CREATE VIEW metabib.full_attr_id_map AS
 CREATE OR REPLACE FUNCTION metabib.compile_composite_attr ( cattr_def TEXT ) RETURNS query_int AS $func$
 
     use JSON::XS;
-    my $def = shift;
+    my $def = decode_json(shift);
 
     die("Composite attribute definition not supplied") unless $def;
 
index e98c8ea..488c362 100644 (file)
@@ -3,7 +3,7 @@ BEGIN;
 CREATE OR REPLACE FUNCTION metabib.compile_composite_attr ( cattr_def TEXT ) RETURNS query_int AS $func$
 
     use JSON::XS;
-    my $def = shift;
+    my $def = decode_json(shift);
 
     die("Composite attribute definition not supplied") unless $def;