From a15f8ef2728461e63b7d597a50484d0290c46635 Mon Sep 17 00:00:00 2001 From: totoro Date: Tue, 19 Sep 2017 09:44:59 +0900 Subject: [PATCH] add get_DB_id with default value which can be use if the db_id is not found --- web/CXM_web_arg_utils.anubis | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) diff --git a/web/CXM_web_arg_utils.anubis b/web/CXM_web_arg_utils.anubis index 8037ed2..3c37777 100644 --- a/web/CXM_web_arg_utils.anubis +++ b/web/CXM_web_arg_utils.anubis @@ -123,6 +123,20 @@ public define DB_id get_DB_id ( List(Web_arg) lwa, + String arg_name, + DB_id defaut_value + ) = + if get_mb_DB_id(lwa, arg_name) is + { + failure then defaut_value, + success(value) then value + } +. + +public define DB_id + get_DB_id + ( + List(Web_arg) lwa, String arg_name ) = if get_mb_DB_id(lwa, arg_name) is -- libgit2 0.21.4