I have a site where multiple interfaces and its descriptions are listed, as seen here:
Yesterday I changed the description texts from German to English using the PgAdmin Postgres console, everything worked fine and as you can see is displayed correctly.
However, as soon as I use a filter, lets say I want to filter for the "CTI-Schnittstelle" I get the right purple thing on the left saying "XY-Schnittstelle", but I always get the description of the "A1-Schnittstelle".
Here is my backend code for the filter:
def handle_event("filter", interface, socket) do
# i = Kernel.inspect(interface["interface"])
i = "#{interface["interface"]}"
IO.inspect(i)
if String.equivalent?(i, "all") do
data =
from(
c in OranAttack,
order_by: ^sort(interface)
)
|> Repo.paginate()
IO.inspect(data)
{
:noreply,
assign(socket, data: data)
}
else
data =
from(
c in OranAttack,
where: c.interface == ^i
)
|> Repo.paginate()
IO.inspect("##########")
IO.inspect(data)
{
:noreply,
assign(socket, data: data)
}
end
end
As you can see I let it print the data to the console, and the weird thing is I get the correct data, so I get the correct description of the interface the user filtered for. This then also gets sent to the frontend, but there somehow the description of the alphabetical first interface appears.
Any help appreciated!