Skip to content

Commit

Permalink
null_check
Browse files Browse the repository at this point in the history
  • Loading branch information
jmphilli committed Jun 25, 2021
1 parent c4bc955 commit 654d854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynamodb/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,14 +1009,14 @@ def __setattr__(self, name, value):
else:
super().__setattr__(name, value)

def serialize(self, values):
def serialize(self, values, *, null_check: bool = True):
if not isinstance(values, type(self)):
# Copy the values onto an instance of the class for serialization.
instance = type(self)()
instance.attribute_values = {} # clear any defaults
instance._set_attributes(**values)
values = instance
rval = AttributeContainer.serialize(values)
rval = AttributeContainer._container_serialize(values, null_check=null_check)
for attr_name in values:
if attr_name not in self.get_attributes():
v = values[attr_name]
Expand Down

0 comments on commit 654d854

Please sign in to comment.