organization default to null
This commit is contained in:
parent
4d3e9f2b32
commit
e82fb49028
@ -17,7 +17,7 @@ DECLARE
|
|||||||
apikey_config json;
|
apikey_config json;
|
||||||
is_organization boolean;
|
is_organization boolean;
|
||||||
username text;
|
username text;
|
||||||
organization_name text;
|
organization_name text DEFAULT NULL;
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT cartodb.cdb_conf_getconf('api_keys_'||session_user) INTO apikey_config;
|
SELECT cartodb.cdb_conf_getconf('api_keys_'||session_user) INTO apikey_config;
|
||||||
|
|
||||||
@ -26,8 +26,6 @@ BEGIN
|
|||||||
RAISE EXCEPTION 'User must have user configuration in the config table';
|
RAISE EXCEPTION 'User must have user configuration in the config table';
|
||||||
ELSIF is_organization = TRUE THEN
|
ELSIF is_organization = TRUE THEN
|
||||||
SELECT cartodb.cdb_conf_getconf('user_config')->>'entity_name' INTO organization_name;
|
SELECT cartodb.cdb_conf_getconf('user_config')->>'entity_name' INTO organization_name;
|
||||||
ELSE
|
|
||||||
organization_name = NULL;
|
|
||||||
END IF;
|
END IF;
|
||||||
result.username = apikey_config->'username';
|
result.username = apikey_config->'username';
|
||||||
result.organization_name = organization_name;
|
result.organization_name = organization_name;
|
||||||
|
Loading…
Reference in New Issue
Block a user