aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility')
-rw-r--r--wqflask/utility/tools.py2
-rw-r--r--wqflask/utility/type_checking.py24
2 files changed, 13 insertions, 13 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 68ef0f04..65df59c3 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -267,7 +267,7 @@ ORCID_CLIENT_SECRET = get_setting('ORCID_CLIENT_SECRET')
ORCID_AUTH_URL = None
if ORCID_CLIENT_ID != 'UNKNOWN' and ORCID_CLIENT_SECRET:
ORCID_AUTH_URL = "https://orcid.org/oauth/authorize?response_type=code&scope=/authenticate&show_login=true&client_id=" + \
- ORCID_CLIENT_ID+"&client_secret="+ORCID_CLIENT_SECRET
+ ORCID_CLIENT_ID+"&client_secret="+ORCID_CLIENT_SECRET + "&redirect_uri=" + GN2_BRANCH_URL + "n/login/orcid_oauth2"
ORCID_TOKEN_URL = get_setting('ORCID_TOKEN_URL')
ELASTICSEARCH_HOST = get_setting('ELASTICSEARCH_HOST')
diff --git a/wqflask/utility/type_checking.py b/wqflask/utility/type_checking.py
index f15b17e2..6b029317 100644
--- a/wqflask/utility/type_checking.py
+++ b/wqflask/utility/type_checking.py
@@ -23,20 +23,20 @@ def is_str(value):
except:
return False
-def get_float(vars,name,default=None):
- if name in vars:
- if is_float(vars[name]):
- return float(vars[name])
+def get_float(vars_obj,name,default=None):
+ if name in vars_obj:
+ if is_float(vars_obj[name]):
+ return float(vars_obj[name])
return default
-def get_int(vars,name,default=None):
- if name in vars:
- if is_int(vars[name]):
- return float(vars[name])
+def get_int(vars_obj,name,default=None):
+ if name in vars_obj:
+ if is_int(vars_obj[name]):
+ return float(vars_obj[name])
return default
-def get_string(vars,name,default=None):
- if name in vars:
- if not vars[name] is None:
- return str(vars[name])
+def get_string(vars_obj,name,default=None):
+ if name in vars_obj:
+ if not vars_obj[name] is None:
+ return str(vars_obj[name])
return default