Skip to content

Commit

Permalink
Merge pull request #122 from andrewduckett/patch/serialize_all
Browse files Browse the repository at this point in the history
fix serialize all to use keyword arguments
  • Loading branch information
vetsin authored Oct 15, 2024
2 parents eb9f812 + 542af38 commit d0ab688
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pysnc/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def __init__(self, name: str, value=None, display_value=None, parent_record=None
self._changed = False
self._link = None
if isinstance(value, dict):
self._value = value['value']
if 'value' in value:
self._value = value['value']
# only bother to set display value if it's different
if self._value != value['display_value']:
if 'display_value' in value and self._value != value['display_value']:
self._display_value = value['display_value']
if 'link' in value:
self._link = value['link']
Expand Down Expand Up @@ -1090,7 +1091,7 @@ def serialize_all(self, display_value=False, fields=None, fmt=None, exclude_refe
:param fmt:
:return: list
"""
return [record.serialize(display_value, fields, fmt, exclude_reference_link) for record in self]
return [record.serialize(display_value=display_value, fields=fields, fmd=fmt, exclude_reference_link=exclude_reference_link) for record in self]

def to_pandas(self, columns=None, mode='smart'):
"""
Expand Down

0 comments on commit d0ab688

Please sign in to comment.