Skip to content

Commit

Permalink
Merge pull request #32 from uktrade/feature/orpd-57-legislation-searc…
Browse files Browse the repository at this point in the history
…h-api

temp:comment out unused legislation search logic in views.py
  • Loading branch information
hareshkainthdbt authored Oct 17, 2024
2 parents 33b757e + 74f1fc6 commit b422c49
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions orp/orp_search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,17 @@ def search(request: HttpRequest) -> HttpResponse:
# Legislation search
# If config.search_terms is empty then we don't need to
# search for legislation
if not config.search_terms or "" in config.search_terms:
logger.info("no search terms provided")
return render(request, template_name="orp.html", context=context)

if not config.document_types or "legislation" in config.document_types:
logger.info("searching for legislation: %s", config.search_terms)
legislation = Legislation()
legislation_results = legislation.search(config)
logger.info(f"legislation results: {legislation_results}")
context = legislation.finalise_results(
config, legislation_results, context
)
# if not config.search_terms or "" in config.search_terms:
# logger.info("no search terms provided")
# return render(request, template_name="orp.html", context=context)

# if not config.document_types or "legislation" in config.document_types:
# logger.info("searching for legislation: %s", config.search_terms)
# legislation = Legislation()
# legislation_results = legislation.search(config)
# logger.info(f"legislation results: {legislation_results}")
# context = legislation.finalise_results(
# config, legislation_results, context
# )

return render(request, template_name="orp.html", context=context)

0 comments on commit b422c49

Please sign in to comment.