Skip to content

Commit

Permalink
call serialization from instance directly
Browse files Browse the repository at this point in the history
  • Loading branch information
yedpodtrzitko committed Nov 23, 2016
1 parent 6b7cf22 commit c56c8da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynamodb/models.py
Expand Up @@ -395,7 +395,7 @@ def update(self, attributes, conditional_operator=None, **expected_values):
action = params['action'] and params['action'].upper()
attr_values = {ACTION: action}
if action != DELETE:
attr_values[VALUE] = Model._serialize_value(attribute_cls, params['value'])
attr_values[VALUE] = self._serialize_value(attribute_cls, params['value'])

kwargs[pythonic(ATTR_UPDATES)][attribute_cls.attr_name] = attr_values

Expand Down Expand Up @@ -1253,7 +1253,7 @@ def _serialize(self, attr_map=False, null_check=True):
raise ValueError("Attribute '{0}' is not correctly typed".format(attr.attr_name))
value = value.get_values()

serialized = Model._serialize_value(attr, value, null_check)
serialized = self._serialize_value(attr, value, null_check)
if NULL in serialized:
continue

Expand Down

0 comments on commit c56c8da

Please sign in to comment.