Skip to content

Commit

Permalink
Create the event struct correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
LostKobrakai committed Sep 10, 2020
1 parent 6d8dfb1 commit 857c007
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fable/events.ex
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,9 @@ defmodule Fable.Events do
}

case config.event_schema do
{_table, schema} -> schema
schema -> schema
{table, schema} -> schema |> struct() |> Ecto.put_meta(source: table)
schema -> schema |> struct()
end
|> struct()
|> Ecto.Changeset.cast(attrs, Map.keys(attrs))
end

Expand Down

0 comments on commit 857c007

Please sign in to comment.