Skip to content

Commit

Permalink
Allow a series book to be numbered 0 0️⃣ (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
doughsay authored Sep 23, 2022
1 parent 8ba2e8e commit 5032fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ambry/series/series_book.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5032fd7

Please sign in to comment.