From 5032fd7b61479da3d73e488f681dc953b7e7e5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Dos=C3=A9?= Date: Thu, 22 Sep 2022 18:37:11 -0700 Subject: [PATCH] =?UTF-8?q?Allow=20a=20series=20book=20to=20be=20numbered?= =?UTF-8?q?=200=200=EF=B8=8F=E2=83=A3=20(#354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ambry/series/series_book.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ambry/series/series_book.ex b/lib/ambry/series/series_book.ex index fe17ca5e..bae7e724 100644 --- a/lib/ambry/series/series_book.ex +++ b/lib/ambry/series/series_book.ex @@ -25,7 +25,7 @@ defmodule Ambry.Series.SeriesBook do series_book |> cast(attrs, [:book_id, :book_number, :series_id, :delete]) |> validate_required([:book_number]) - |> validate_number(:book_number, greater_than: 0) + |> validate_number(:book_number, greater_than_or_equal_to: 0) |> maybe_apply_delete() end