diff --git a/lib/atomic_web/live/organization_live/index.ex b/lib/atomic_web/live/organization_live/index.ex index da47c675c..7ff8b6aef 100644 --- a/lib/atomic_web/live/organization_live/index.ex +++ b/lib/atomic_web/live/organization_live/index.ex @@ -78,8 +78,4 @@ defmodule AtomicWeb.OrganizationLive.Index do defp list_organizations do Organizations.list_organizations() end - - def update_default_organization(user, organization) do - Accounts.update_user(user, %{default_organization_id: organization.id}) - end end diff --git a/lib/atomic_web/live/organization_live/show.ex b/lib/atomic_web/live/organization_live/show.ex index 58752f813..7ff285e88 100644 --- a/lib/atomic_web/live/organization_live/show.ex +++ b/lib/atomic_web/live/organization_live/show.ex @@ -19,14 +19,9 @@ defmodule AtomicWeb.OrganizationLive.Show do @impl true def handle_params(%{"organization_id" => id}, _, socket) do organization = Organizations.get_organization!(id, [:departments]) - user = socket.assigns.current_user activities = Activities.list_activities_by_organization_id(id, []) departments = organization.departments - if user.default_organization_id != id do - Accounts.update_user(user, %{"default_organization_id" => id}) - end - entries = [ %{ name: gettext("Organizations"), diff --git a/lib/atomic_web/templates/layout/live.html.heex b/lib/atomic_web/templates/layout/live.html.heex index 6197c615a..1e3448e6b 100644 --- a/lib/atomic_web/templates/layout/live.html.heex +++ b/lib/atomic_web/templates/layout/live.html.heex @@ -1,7 +1,7 @@
-
+