Skip to content

Commit

Permalink
fix: do not use non-init params in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Nov 21, 2024
1 parent f5ba3ac commit 80b2b61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reactable/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,9 @@ def merge(self, other: Column | None):
if other is None:
return self

field_attrs = {field.name: getattr(self, field.name) for field in fields(self)}
field_attrs = {
field.name: getattr(self, field.name) for field in fields(self) if field.init
}
return replace(other, **filter_none(field_attrs))

def to_props(self) -> dict[str, Any]:
Expand Down

0 comments on commit 80b2b61

Please sign in to comment.