From: scottmk Date: Sun, 24 May 2009 22:22:18 +0000 (+0000) Subject: In SELECT(): Eliminate a sanity check and error message because X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f37030249cbc7dd2cb8cae3afa3df7efcc5860c4;p=Evergreen.git In SELECT(): Eliminate a sanity check and error message because they are now redundant. We don't need to verify that a class in the SELECT clause is defined in the IDL, because we also verify that the class is referenced in the FROM clause, and all of those classes have already been vetted against the IDL. git-svn-id: svn://svn.open-ils.org/ILS/trunk@13221 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c index 1a5b549964..d78a7137ac 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -2936,33 +2936,7 @@ char* SELECT ( jsonIterator* selclass_itr = jsonNewIterator( selhash ); while ( (selclass = jsonIteratorNext( selclass_itr )) ) { // For each class - // Make sure the class is defined in the IDL const char* cname = selclass_itr->key; - osrfHash* idlClass = osrfHashGet( oilsIDL(), cname ); - if (!idlClass) { - osrfLogError( - OSRF_LOG_MARK, - "%s: Selected class \"%s\" not defined in IDL", - MODULENAME, - cname - ); - - if (ctx) - osrfAppSessionStatus( - ctx->session, - OSRF_STATUS_INTERNALSERVERERROR, - "osrfMethodException", - ctx->request, - "Selected class is not defined" - ); - jsonIteratorFree( selclass_itr ); - buffer_free( sql_buf ); - buffer_free( select_buf ); - buffer_free( group_buf ); - if( defaultselhash ) jsonObjectFree( defaultselhash ); - free( core_class ); - return NULL; - } // Make sure the target relation is in the FROM clause. @@ -3003,6 +2977,7 @@ char* SELECT ( // Look up some attributes of the current class, so that we // don't have to look them up again for each field + osrfHash* idlClass = osrfHashGet( oilsIDL(), cname ); osrfHash* class_field_set = osrfHashGet( idlClass, "fields" ); const char* class_pkey = osrfHashGet( idlClass, "primarykey" ); const char* class_tname = osrfHashGet( idlClass, "tablename" );