Skip to content

Commit 4220bcf

Browse files
authored
Fix bug when casting has many association (#10)
1 parent 43678cf commit 4220bcf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/paper_trail/serializer.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ defmodule PaperTrail.Serializer do
155155
associations = serialize_associations(model, options, event)
156156

157157
changes
158+
|> Map.take(schema.__schema__(:fields))
158159
|> Enum.map(&dump_field!(&1, schema, adapter, options, event))
159160
|> Map.new()
160161
|> Map.merge(associations)

0 commit comments

Comments
 (0)