Skip to content

Commit

Permalink
Merge pull request #49 from uktrade/feature/orpd-54-search-terms
Browse files Browse the repository at this point in the history
fix:handle None values in document_types and publisher_names
  • Loading branch information
hareshkainthdbt authored Nov 20, 2024
2 parents 2a0488d + 93c749e commit 1b0abce
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions orp/orp_search/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ def __init__(
request.
"""
self.search_query = search_query
self.document_types = [doc_type.lower() for doc_type in document_types]
self.document_types = (
None
if document_types is None
else [doc_type.lower() for doc_type in document_types]
)
self.timeout = None if timeout is None else int(timeout)
self.limit = limit
self.offset = offset
self.publisher_names = [
pub_name.lower() for pub_name in publisher_names
]
self.publisher_names = (
None
if publisher_names is None
else [pub_name.lower() for pub_name in publisher_names]
)
self.sort_by = sort_by
self.id = id

Expand Down

0 comments on commit 1b0abce

Please sign in to comment.