Skip to content

Commit

Permalink
Fix attribute null check
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobrobertsbaca authored and lyang committed May 12, 2022
1 parent c4d84c9 commit 85d739a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynamodb_encoder/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def encode_container(self, container: AttributeContainer) -> Dict[str, Any]:
encoded = {}
for name, attr in container.get_attributes().items():
value = getattr(container, name)
if value:
if value is not None:
encoded[name] = self.encode_attribute(attr, value)
return encoded

Expand Down

0 comments on commit 85d739a

Please sign in to comment.