bad pkey parsing for update and delete return values
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Dec 2008 21:24:03 +0000 (21:24 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Dec 2008 21:24:03 +0000 (21:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11614 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_cstore.c

index 7bf6688..326bb36 100644 (file)
@@ -3544,7 +3544,7 @@ static jsonObject* doUpdate(osrfMethodContext* ctx, int* err ) {
                
        }
 
-       jsonObject* obj = jsonParseString(id);
+       jsonObject* obj = jsonNewObject(id);
 
        if ( strcmp( osrfHashGet( osrfHashGet( osrfHashGet(meta, "fields"), pkey ), "primitive" ), "number" ) )
                dbi_conn_quote_string(dbhandle, &id);
@@ -3641,7 +3641,7 @@ static jsonObject* doDelete(osrfMethodContext* ctx, int* err ) {
                id
        );
 
-       obj = jsonParseString(id);
+       obj = jsonCloneObject(jsonObjectGetIndex( ctx->params, _obj_pos ));
 
        if ( strcmp( osrfHashGet( osrfHashGet( osrfHashGet(meta, "fields"), pkey ), "primitive" ), "number" ) )
                dbi_conn_quote_string(writehandle, &id);