Skip to content

Commit

Permalink
Update upload sensitivity required message (fixes #29)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed May 4, 2022
1 parent 2c8abb3 commit e002d66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/lib/platform/material/media.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ defmodule Platform.Material.Media do
media
|> cast(attrs, [:description, :attr_sensitive])
|> validate_required([:description])
|> validate_required([:attr_sensitive],
message:
"Media sensitivity must be set. If this media isn't sensitive, choose 'Not Sensitive.'"
)

# These are special attributes, since we define it at creation time. Eventually, it'd be nice to unify this logic with the attribute-specific editing logic.
|> Attribute.validate_attribute(Attribute.get_attribute(:sensitive))
Expand Down

0 comments on commit e002d66

Please sign in to comment.