make step content not a required field

This commit is contained in:
shibao 2023-11-04 22:10:16 -04:00
parent e2f8ac6b78
commit 0a27a4ee29
2 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@
- Fix debounces
- Allow space as delimiter for tags
- Add bottom padding to page
- Make pipeline step not require content
# v0.1.12
- Code quality fixes

View File

@ -50,7 +50,7 @@ defmodule Memex.Pipelines.Steps.Step do
%__MODULE__{}
|> cast(attrs, [:title, :content])
|> change(pipeline_id: pipeline_id, user_id: user_id, position: position)
|> validate_required([:title, :content, :user_id, :position])
|> validate_required([:title, :user_id, :position])
end
@spec update_changeset(t(), attrs :: map(), User.t()) ::
@ -62,7 +62,7 @@ defmodule Memex.Pipelines.Steps.Step do
) do
step
|> cast(attrs, [:title, :content])
|> validate_required([:title, :content, :user_id, :position])
|> validate_required([:title, :user_id, :position])
end
@spec position_changeset(t(), position :: non_neg_integer(), User.t()) :: changeset()
@ -73,6 +73,6 @@ defmodule Memex.Pipelines.Steps.Step do
) do
step
|> change(position: position)
|> validate_required([:title, :content, :user_id, :position])
|> validate_required([:title, :user_id, :position])
end
end