From 63625254d888cb9a9a40a478621baec392aa15fe Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 7 Sep 2023 11:33:41 +0100 Subject: [PATCH] remove more debug code ... #145 --- lib/app/item.ex | 1 - lib/app/list.ex | 1 + lib/app_web/live/app_live.ex | 3 --- test/app/stats_test.exs | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/app/item.ex b/lib/app/item.ex index b1edcda7..43a1e742 100644 --- a/lib/app/item.ex +++ b/lib/app/item.ex @@ -217,7 +217,6 @@ defmodule App.Item do all_list = App.List.get_all_list_for_person(person_id) seq = App.List.get_list_seq(all_list) - sql = """ SELECT i.id, i.cid, i.text, i.status, i.person_id, i.updated_at, t.start, t.stop, t.id as timer_id diff --git a/lib/app/list.ex b/lib/app/list.ex index dd1193be..a4d7c993 100644 --- a/lib/app/list.ex +++ b/lib/app/list.ex @@ -134,6 +134,7 @@ defmodule App.List do def get_all_list_for_person(person_id) do # IO.inspect("get_all_list_for_person(person_id: #{person_id})") all_list = get_list_by_name!("all", person_id) + if all_list == nil do # doesn't exist, create it: {:ok, %{model: list}} = diff --git a/lib/app_web/live/app_live.ex b/lib/app_web/live/app_live.ex index acf34a4f..c6c884ef 100644 --- a/lib/app_web/live/app_live.ex +++ b/lib/app_web/live/app_live.ex @@ -268,14 +268,12 @@ defmodule AppWeb.AppLive do @impl true def handle_event("highlight", %{"id" => id}, socket) do - # IO.puts("highlight: #{id}") AppWeb.Endpoint.broadcast(@topic, "move_items", {:drag_item, id}) {:noreply, socket} end @impl true def handle_event("removeHighlight", %{"id" => id}, socket) do - # IO.puts("removeHighlight: #{id}") AppWeb.Endpoint.broadcast(@topic, "move_items", {:drop_item, id}) {:noreply, socket} end @@ -318,7 +316,6 @@ defmodule AppWeb.AppLive do }, socket ) do - {:noreply, push_event(socket, "dragover-item", %{ current_item_id: current_item_id, diff --git a/test/app/stats_test.exs b/test/app/stats_test.exs index 122267ac..0893b943 100644 --- a/test/app/stats_test.exs +++ b/test/app/stats_test.exs @@ -80,7 +80,7 @@ defmodule App.StatsTest do assert first_element.person_id == 2 end - test "Stats.validate_sort_column/1 returns false for invalid sort _column" do + test "Stats.validate_sort_column/1 returns false for invalid sort_column" do refute Stats.validate_sort_column(:invalid) end