Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Apr 9, 2019
2 parents bda29f6 + c0f0e50 commit 8dd1ed0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def split_uri(uri_str):
# we are asumming the path only contains one colon
namespace, value = uri.heirarchical.split(':', 1)
scheme = ''.join([uri.scheme.name, ':', namespace])
if namespace is "isbn":
if namespace == "isbn":
# we store hyphenless isbn numbers - remove hyphens from input
value = value.replace("-", "")
# we store lowercased URIs - let's lower input
Expand All @@ -306,8 +306,8 @@ def get_from_uri(input_scheme, input_value, clause, params):
uri_value, canonical, 0 AS score
FROM work_uri INNER JOIN work USING(work_id)
WHERE work_id IN (SELECT work_id FROM work_uri
WHERE uri_scheme = $inscheme
AND uri_value = $invalue)
WHERE uri_scheme = lower($inscheme)
AND uri_value = lower($invalue))
''' + clause + '''
ORDER BY canonical DESC;'''
result = db.query(q, options)
Expand Down

0 comments on commit 8dd1ed0

Please sign in to comment.