Skip to content

Commit

Permalink
made sure that returning 3 results_sections is allowed to properly …
Browse files Browse the repository at this point in the history
…support calendar search
  • Loading branch information
CommanderStorm committed Dec 14, 2024
1 parent 9789cef commit da7a8db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/search/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ pub async fn search_handler(
let results_sections = cached_geoentry_search(q, highlighting, limits, search_addresses).await;
debug!("searching returned {results_sections:?}");

if results_sections.len() != 2 {
if results_sections.len() != 2 && results_sections.len() != 3 {
error!(
"searching returned {len} sections, but expected 2",
"searching returned {len} sections, but expected 2-3",
len = results_sections.len()
);
return HttpResponse::InternalServerError().body("Internal error");
Expand Down

0 comments on commit da7a8db

Please sign in to comment.