Skip to content

Commit

Permalink
Fix entry search with underscore
Browse files Browse the repository at this point in the history
Addresses #47 (comment)
  • Loading branch information
gadhagod committed Nov 28, 2024
1 parent 79d2735 commit 0c8224f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions endpoints/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def get_entry_with_id(self, id):
return entry

def get_entry_with_name(self, name):
entry = self.query_machine.search_doc({'name': name})
entry = self.query_machine.search_doc({'name': name.replace('_', ' ')})
if entry is None:
raise EntryNonexistant(id)
raise EntryNonexistant(name)
return entry

def get_entry(self, id_or_name: str):
Expand Down

0 comments on commit 0c8224f

Please sign in to comment.