From f47bb5be1d8cd6deb4252770b604260f2500ebdd Mon Sep 17 00:00:00 2001 From: Bill Riehl Date: Wed, 30 May 2018 11:59:41 -0700 Subject: [PATCH] Manage tokens better. --- lib/NarrativeService/NarrativeServiceImpl.py | 2 +- lib/NarrativeService/ReportFetcher.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/NarrativeService/NarrativeServiceImpl.py b/lib/NarrativeService/NarrativeServiceImpl.py index b1104f2..b8bbdfe 100644 --- a/lib/NarrativeService/NarrativeServiceImpl.py +++ b/lib/NarrativeService/NarrativeServiceImpl.py @@ -548,7 +548,7 @@ def find_object_report(self, ctx, params): # ctx is the context object # return variables are: returnVal #BEGIN find_object_report - report_fetcher = ReportFetcher(self.workspaceURL) + report_fetcher = ReportFetcher(Workspace(self.workspaceURL, token=ctx["token"])) returnVal = report_fetcher.find_report_from_object(params['upa']) #END find_object_report diff --git a/lib/NarrativeService/ReportFetcher.py b/lib/NarrativeService/ReportFetcher.py index a5f07d5..d7fb165 100644 --- a/lib/NarrativeService/ReportFetcher.py +++ b/lib/NarrativeService/ReportFetcher.py @@ -2,8 +2,8 @@ from NarrativeService.ServiceUtils import ServiceUtils class ReportFetcher(object): - def __init__(self, ws_url): - self.ws_client = Workspace(url=ws_url) + def __init__(self, ws_client): + self.ws_client = ws_client def find_report_from_object(self, upa): #TODO: