make step content not a required field
This commit is contained in:
parent
e2f8ac6b78
commit
0a27a4ee29
@ -3,6 +3,7 @@
|
|||||||
- Fix debounces
|
- Fix debounces
|
||||||
- Allow space as delimiter for tags
|
- Allow space as delimiter for tags
|
||||||
- Add bottom padding to page
|
- Add bottom padding to page
|
||||||
|
- Make pipeline step not require content
|
||||||
|
|
||||||
# v0.1.12
|
# v0.1.12
|
||||||
- Code quality fixes
|
- Code quality fixes
|
||||||
|
@ -50,7 +50,7 @@ defmodule Memex.Pipelines.Steps.Step do
|
|||||||
%__MODULE__{}
|
%__MODULE__{}
|
||||||
|> cast(attrs, [:title, :content])
|
|> cast(attrs, [:title, :content])
|
||||||
|> change(pipeline_id: pipeline_id, user_id: user_id, position: position)
|
|> 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
|
end
|
||||||
|
|
||||||
@spec update_changeset(t(), attrs :: map(), User.t()) ::
|
@spec update_changeset(t(), attrs :: map(), User.t()) ::
|
||||||
@ -62,7 +62,7 @@ defmodule Memex.Pipelines.Steps.Step do
|
|||||||
) do
|
) do
|
||||||
step
|
step
|
||||||
|> cast(attrs, [:title, :content])
|
|> cast(attrs, [:title, :content])
|
||||||
|> validate_required([:title, :content, :user_id, :position])
|
|> validate_required([:title, :user_id, :position])
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec position_changeset(t(), position :: non_neg_integer(), User.t()) :: changeset()
|
@spec position_changeset(t(), position :: non_neg_integer(), User.t()) :: changeset()
|
||||||
@ -73,6 +73,6 @@ defmodule Memex.Pipelines.Steps.Step do
|
|||||||
) do
|
) do
|
||||||
step
|
step
|
||||||
|> change(position: position)
|
|> change(position: position)
|
||||||
|> validate_required([:title, :content, :user_id, :position])
|
|> validate_required([:title, :user_id, :position])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user