Skip to content

Commit

Permalink
Merge pull request #407 from DigitalSlideArchive/harden-api-call
Browse files Browse the repository at this point in the history
Harden API call to database.
  • Loading branch information
manthey authored May 10, 2024
2 parents f00a9d0 + b91ab67 commit d869b36
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ def prerelease_local_scheme(version):
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
description='Digital Slide Archive Whole-Slide Image DeIdentification plugin',
install_requires=[
Expand Down
1 change: 1 addition & 0 deletions wsi_deid/matching_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def lookupQuery(self, query):
req = requests.post(self.url, headers=headers, data=json.dumps(query))
except Exception:
self.logger.exception('Failed to query API')
return []
return req.json()

def lookupQueries(self, queryList):
Expand Down
2 changes: 1 addition & 1 deletion wsi_deid/web_client/views/ItemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ wrap(ItemViewWidget, 'render', function (render) {
}
// sort the results
const sorted = {};
Object.keys(internal[parts[1]]).sort().forEach((k) => {
Object.keys(internal[parts[1]] || {}).sort().forEach((k) => {
sorted[k] = internal[parts[1]][k];
});
internal[parts[1]] = sorted;
Expand Down

0 comments on commit d869b36

Please sign in to comment.