Skip to content

Commit

Permalink
fix: field not being on the changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
ruilopesm committed Feb 4, 2024
1 parent 28e20fa commit 849c8a9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/safira/contest/badge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ defmodule Safira.Contest.Badge do
:begin_badge,
:end_badge,
:type,
:tokens
:tokens,
:counts_for_day
])
|> cast_attachments(attrs, [:avatar])
|> validate_required([
Expand All @@ -58,7 +59,8 @@ defmodule Safira.Contest.Badge do
:begin_badge,
:end_badge,
:type,
:tokens
:tokens,
:counts_for_day
])
|> validate_length(:name, min: 1, max: 255)
|> validate_length(:description, min: 1, max: 1000)
Expand All @@ -76,7 +78,8 @@ defmodule Safira.Contest.Badge do
:name,
:description,
:type,
:tokens
:tokens,
:counts_for_day
])
|> cast_attachments(attrs, [:avatar])
|> validate_required([
Expand All @@ -87,7 +90,8 @@ defmodule Safira.Contest.Badge do
:name,
:description,
:type,
:tokens
:tokens,
:counts_for_day
])
|> validate_length(:name, min: 1, max: 255)
|> validate_length(:description, min: 1, max: 1000)
Expand Down

0 comments on commit 849c8a9

Please sign in to comment.