Skip to content

Commit

Permalink
Implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRodrigues10 committed Aug 9, 2023
1 parent 9dab7ba commit 734cf33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion lib/atomic/departments.ex
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ defmodule Atomic.Departments do
"""
def create_collaborator(attrs \\ %{}, _after_save \\ &{:ok, &1}) do
%Collaborator{}
|> Collaborator.create_changeset(attrs)
|> Collaborator.changeset(attrs)
|> Repo.insert()
end

Expand Down
6 changes: 0 additions & 6 deletions lib/atomic/organizations/collaborator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,4 @@ defmodule Atomic.Organizations.Collaborator do
|> cast(attrs, @required_fields ++ @optional_fields)
|> validate_required(@required_fields)
end

def create_changeset(collaborator_departments, attrs) do
collaborator_departments
|> cast(attrs, @required_fields)
|> validate_required(@required_fields)
end
end

0 comments on commit 734cf33

Please sign in to comment.