Skip to content

Commit

Permalink
fix(om_check_data): control nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
danimarinBG committed Jan 16, 2025
1 parent 29830a2 commit 3c91c1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/fct/gw_fct_om_check_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ BEGIN

-- create temp tables
IF v_fid = 125 THEN
EXECUTE 'SELECT gw_fct_create_querytables($${"data":{"verifiedExceptions":'||v_verified_exceptions||',"selectionMode":"'||v_selection_mode||'", "checkPsectors":"'||v_checkpsectors||'"}}$$::json)';
EXECUTE 'SELECT gw_fct_create_querytables($${"data":{"verifiedExceptions":'||COALESCE(v_verified_exceptions, 'false')||',"selectionMode":"'||COALESCE(v_selection_mode, 'userSelectors')||'", "checkPsectors":"'||COALESCE(v_checkpsectors, 'false')||'"}}$$::json)';
END IF;

-- getting sys_fprocess to be executed
v_querytext = 'select * from sys_fprocess where project_type in (lower('||quote_literal(v_project_type)||'), ''utils'') and addparam is null and query_text is not null and function_name ilike ''%om_check%'' order by fid asc';

raise notice '%', v_querytext;
for v_rec in execute v_querytext

for v_rec in execute v_querytext
loop
EXECUTE 'select gw_fct_check_fprocess($${"client":{"device":4, "infoType":1, "lang":"ES"},
"form":{},"feature":{},"data":{"parameters":{"functionFid": '||v_fid||', "checkFid":"'||v_rec.fid||'"}}}$$)';
Expand Down Expand Up @@ -95,7 +95,7 @@ BEGIN
-- Exception handling
--EXCEPTION WHEN OTHERS THEN
--GET STACKED DIAGNOSTICS v_error_context = pg_exception_context;
--RETURN json_build_object('status', 'Failed', 'NOSQLERR', SQLERRM, 'message', json_build_object('level', right(SQLSTATE, 1), 'text', SQLERRM), 'SQLSTATE',
--RETURN json_build_object('status', 'Failed', 'NOSQLERR', SQLERRM, 'message', json_build_object('level', right(SQLSTATE, 1), 'text', SQLERRM), 'SQLSTATE',
--SQLSTATE, 'SQLCONTEXT', v_error_context)::json;

END;
Expand Down

0 comments on commit 3c91c1e

Please sign in to comment.