From 8f6ec3136604b38c2b720a52cb467556987646c4 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Tue, 1 Aug 2023 17:58:42 +0300 Subject: [PATCH] Fix Links.update_one/2. --- CHANGELOG.org | 2 ++ lib/link_shortener/links/links.ex | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index b3505be..75853cb 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -28,4 +28,6 @@ Move Links to the Links context. Refactor to split the Links to a Link model and a Links logic. Update the controller and the view for updated Link model. +** 0.4.4 <2023-08-01 Tue> + Fix Links.update_one/2. diff --git a/lib/link_shortener/links/links.ex b/lib/link_shortener/links/links.ex index 75fa2a8..412c8e1 100644 --- a/lib/link_shortener/links/links.ex +++ b/lib/link_shortener/links/links.ex @@ -25,7 +25,7 @@ defmodule LinkShortener.Links.Links do end def update_one(%Link{} = link, changes) do - Link + link |> Link.changeset(changes) |> Repo.update() end