diff --git a/lib/philomena/dnp_entries/dnp_entry.ex b/lib/philomena/dnp_entries/dnp_entry.ex index 14b5e90f..5db6b435 100644 --- a/lib/philomena/dnp_entries/dnp_entry.ex +++ b/lib/philomena/dnp_entries/dnp_entry.ex @@ -1,6 +1,7 @@ defmodule Philomena.DnpEntries.DnpEntry do use Ecto.Schema import Ecto.Changeset + import Philomena.MarkdownWriter alias Philomena.Tags.Tag alias Philomena.Users.User @@ -38,6 +39,9 @@ defmodule Philomena.DnpEntries.DnpEntry do |> validate_required([:reason, :dnp_type]) |> validate_inclusion(:dnp_type, types()) |> validate_conditions() + |> put_markdown(attrs, :conditions, :conditions_md) + |> put_markdown(attrs, :reason, :reason_md) + |> put_markdown(attrs, :instructions, :instructions_md) |> foreign_key_constraint(:tag_id, name: "fk_rails_473a736b4a") end