fixed bug in org setting value parsing. now calling ancestor default method to searc...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Sep 2008 20:43:23 +0000 (20:43 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Sep 2008 20:43:23 +0000 (20:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10731 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index fa8d755..3119214 100644 (file)
@@ -165,19 +165,17 @@ jsonObject* oilsUtilsFetchUserByBarcode(const char* barcode) {
 char* oilsUtilsFetchOrgSetting( int orgid, const char* setting ) {
        if(!setting) return NULL;
 
-       jsonObject* params = jsonParseStringFmt(
-                       "[{ \"org_unit\": %d, \"name\":\"%s\" }]", orgid, setting );
+       jsonObject* params = jsonParseStringFmt("[%d, \"%s\"]", orgid, setting );
 
        jsonObject* set = oilsUtilsQuickReq(
-               "open-ils.storage",
-               "open-ils.storage.direct.actor.org_unit_setting.search_where", params );
+               "open-ils.actor",
+        "open-ils.actor.ou_setting.ancestor_default", params);
 
+    char* value = jsonObjectToSimpleString(jsonObjectGetKey(set, "value"));
        jsonObjectFree(params);
-       char* value = oilsFMGetString( set, "value" );
        jsonObjectFree(set);
        osrfLogDebug(OSRF_LOG_MARK, "Fetched org [%d] setting: %s => %s", orgid, setting, value);
        return value;
-
 }