Skip to content

Commit

Permalink
Merge pull request #17 from aanil/master
Browse files Browse the repository at this point in the history
Fix import of ViewQuery
  • Loading branch information
ssjunnebo authored Nov 21, 2024
2 parents 4d7d94c + d2a2c71 commit 25ed4ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multiqc_ngi/multiqc_ngi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from __future__ import print_function
from collections import OrderedDict
import logging
from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1, ViewQuery
from ibmcloudant import CouchDbSessionAuthenticator, cloudant_v1
from ibm_cloud_sdk_core import ApiException
import json
import os
Expand Down Expand Up @@ -282,7 +282,7 @@ def get_ngi_samples_metadata(self, pid, s_names=None):
if self.test_data is not None:
report.ngi['sample_meta'] = self.test_data['samples']
elif self.couch is not None:
p_view_results = self.couch.post_view_queries(db="projects", ddoc="project", queries=[ViewQuery(key=pid)],
p_view_results = self.couch.post_view_queries(db="projects", ddoc="project", queries=[cloudant_v1.ViewQuery(key=pid)],
view="samples").get_result()
if not len(p_view_results['results'][0]['rows']) == 1:
log.error(f"statusdb returned {len(p_view_results['results'][0]['rows'])} rows when querying {pid}")
Expand Down Expand Up @@ -484,7 +484,7 @@ def push_statusdb_multiqc_data(self):
return None
try:
p_view_results = self.couch.post_view_queries(db="analysis", ddoc="project",
queries=[ViewQuery(key=report.ngi['pid'])],
queries=[cloudant_v1.ViewQuery(key=report.ngi['pid'])],
view="project_id").get_result()
except ConnectionError:
log.error('CouchDB Operation timed out')
Expand Down

0 comments on commit 25ed4ff

Please sign in to comment.