[open-ils-commits] r13815 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 12 11:19:51 EDT 2009
Author: scottmk
Date: 2009-08-12 11:19:49 -0400 (Wed, 12 Aug 2009)
New Revision: 13815
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
For create and update methods: accept boolean column values
as JSON_BOOLs instead of requiring them to be encoded as
"t" or "f" strings.
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-08-11 21:01:41 UTC (rev 13814)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-08-12 15:19:49 UTC (rev 13815)
@@ -1497,6 +1497,11 @@
field_object,
(char*)oilsIDLFindPath("/%s/primarykey", field_object->classname)
);
+ } else if( JSON_BOOL == field_object->type ) {
+ if( jsonBoolIsTrue( field_object ) )
+ value = strdup( "t" );
+ else
+ value = strdup( "f" );
} else {
value = jsonObjectToSimpleString( field_object );
}
@@ -4733,7 +4738,12 @@
value = oilsFMGetString(
field_object,
(char*)oilsIDLFindPath("/%s/primarykey", field_object->classname)
- );
+ );
+ } else if( JSON_BOOL == field_object->type ) {
+ if( jsonBoolIsTrue( field_object ) )
+ value = strdup( "t" );
+ else
+ value = strdup( "f" );
} else {
value = jsonObjectToSimpleString( field_object );
if( field_object && JSON_NUMBER == field_object->type )
More information about the open-ils-commits
mailing list