The changeset has new field (that should be created) and at the same time it is marked for deletion,
this results in an error that says cannot delete ..
because there is nothing to delete in the first place, how can I prevent this from happening?
def maybe_mark_for_deletion(changeset) do
if get_change(changeset, :delete) do
%{changeset | action: :delete}
else
changeset
end
end