|
5 | 5 | from __future__ import print_function
|
6 | 6 | from collections import OrderedDict
|
7 | 7 | import logging
|
8 |
| -from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1, ViewQuery |
| 8 | +from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1 |
9 | 9 | from ibm_cloud_sdk_core import ApiException
|
10 | 10 | import json
|
11 | 11 | import os
|
@@ -282,7 +282,7 @@ def get_ngi_samples_metadata(self, pid, s_names=None):
|
282 | 282 | if self.test_data is not None:
|
283 | 283 | report.ngi['sample_meta'] = self.test_data['samples']
|
284 | 284 | 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)], |
286 | 286 | view="samples").get_result()
|
287 | 287 | if not len(p_view_results['results'][0]['rows']) == 1:
|
288 | 288 | 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):
|
484 | 484 | return None
|
485 | 485 | try:
|
486 | 486 | 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'])], |
488 | 488 | view="project_id").get_result()
|
489 | 489 | except ConnectionError:
|
490 | 490 | log.error('CouchDB Operation timed out')
|
|
0 commit comments