Skip to content

Commit 25ed4ff

Browse files
authored
Merge pull request #17 from aanil/master
Fix import of ViewQuery
2 parents 4d7d94c + d2a2c71 commit 25ed4ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

multiqc_ngi/multiqc_ngi.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from __future__ import print_function
66
from collections import OrderedDict
77
import logging
8-
from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1, ViewQuery
8+
from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1
99
from ibm_cloud_sdk_core import ApiException
1010
import json
1111
import os
@@ -282,7 +282,7 @@ def get_ngi_samples_metadata(self, pid, s_names=None):
282282
if self.test_data is not None:
283283
report.ngi['sample_meta'] = self.test_data['samples']
284284
elif self.couch is not None:
285-
p_view_results = self.couch.post_view_queries(db="projects", ddoc="project", queries=[ViewQuery(key=pid)],
285+
p_view_results = self.couch.post_view_queries(db="projects", ddoc="project", queries=[cloudant_v1.ViewQuery(key=pid)],
286286
view="samples").get_result()
287287
if not len(p_view_results['results'][0]['rows']) == 1:
288288
log.error(f"statusdb returned {len(p_view_results['results'][0]['rows'])} rows when querying {pid}")
@@ -484,7 +484,7 @@ def push_statusdb_multiqc_data(self):
484484
return None
485485
try:
486486
p_view_results = self.couch.post_view_queries(db="analysis", ddoc="project",
487-
queries=[ViewQuery(key=report.ngi['pid'])],
487+
queries=[cloudant_v1.ViewQuery(key=report.ngi['pid'])],
488488
view="project_id").get_result()
489489
except ConnectionError:
490490
log.error('CouchDB Operation timed out')

0 commit comments

Comments
 (0)