You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2018/02/16 11:45:20 UTC
[kibble] 01/02: fix scope!
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git
commit 18716d4ed4deb810785a9c732d30601ced89a6f0
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Feb 16 12:44:47 2018 +0100
fix scope!
---
api/pages/sources.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/api/pages/sources.py b/api/pages/sources.py
index a571d35..786d8e6 100644
--- a/api/pages/sources.py
+++ b/api/pages/sources.py
@@ -151,6 +151,7 @@ def run(API, environ, indata, session):
raise API.exception(403, "You must be logged in to use this API endpoint! %s")
method = environ['REQUEST_METHOD']
+ dOrg = session.user['defaultOrganisation']
if method in ['GET', 'POST']:
# Fetch organisation data
@@ -159,7 +160,6 @@ def run(API, environ, indata, session):
if 'defaultOrganisation' not in session.user or not session.user['defaultOrganisation']:
raise API.exception(400, "You must specify an organisation as default/current in order to add sources.")
- dOrg = session.user['defaultOrganisation']
if session.DB.ES.exists(index=session.DB.dbname, doc_type="organisation", id= dOrg):
org = session.DB.ES.get(index=session.DB.dbname, doc_type="organisation", id= dOrg)['_source']
del org['admins']
--
To stop receiving notification emails like this one, please contact
humbedooh@apache.org.