mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
Fix distance inclusion on reverse search form
This commit is contained in:
parent
89ae9a8742
commit
6b2e46c9e8
2 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,8 @@ defmodule PhilomenaWeb.Search.ReverseController do
|
||||||
create(conn, params)
|
create(conn, params)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create(conn, %{"image" => image_params}) when is_map(image_params) do
|
def create(conn, %{"image" => image_params})
|
||||||
|
when is_map(image_params) and image_params != %{} do
|
||||||
images = ImageReverse.images(image_params)
|
images = ImageReverse.images(image_params)
|
||||||
|
|
||||||
render(conn, "index.html", title: "Reverse Search", images: images)
|
render(conn, "index.html", title: "Reverse Search", images: images)
|
||||||
|
|
|
@ -26,7 +26,7 @@ h1 Reverse Search
|
||||||
.field
|
.field
|
||||||
= label f, :distance, "Match distance (suggested values: between 0.2 and 0.5)"
|
= label f, :distance, "Match distance (suggested values: between 0.2 and 0.5)"
|
||||||
br
|
br
|
||||||
= number_input f, :distance, name: "distance", value: 0.25, min: 0, max: 1, step: 0.01, class: "input"
|
= number_input f, :distance, value: 0.25, min: 0, max: 1, step: 0.01, class: "input"
|
||||||
|
|
||||||
.field
|
.field
|
||||||
= submit "Reverse Search", class: "button"
|
= submit "Reverse Search", class: "button"
|
||||||
|
|
Loading…
Reference in a new issue