Skip to content

Commit

Permalink
Fix bug when casting has many association (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschef authored Dec 2, 2020
1 parent 43678cf commit 4220bcf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/paper_trail/serializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ defmodule PaperTrail.Serializer do
associations = serialize_associations(model, options, event)

changes
|> Map.take(schema.__schema__(:fields))
|> Enum.map(&dump_field!(&1, schema, adapter, options, event))
|> Map.new()
|> Map.merge(associations)
Expand Down

0 comments on commit 4220bcf

Please sign in to comment.