forked from shibao/cannery
fix ammo group create not handling invalid attrs
This commit is contained in:
parent
2a0f5720ee
commit
9e0e9ea2ae
@ -256,6 +256,12 @@ defmodule Cannery.Ammo do
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
def create_ammo_group(invalid_attrs, _user) do
|
||||
%AmmoGroup{}
|
||||
|> AmmoGroup.create_changeset(invalid_attrs |> Map.put("user_id", "-1"))
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Updates a ammo_group.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user