Skip to content

Commit c5acb16

Browse files
committed
Properly handle None values when rendering complex types (#526)
1 parent ebdbe1c commit c5acb16

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Check if soap:address is defined in the service port instead of raising an
55
exception (#527)
66
- Update packaging (stop using find_packages()) (#529)
7+
- Properly handle None values when rendering complex types (#526)
78

89

910
2.3.0 (2017-08-06)

src/zeep/xsd/types/complex.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ def render(self, parent, value, xsd_type=None, render_path=None):
212212
if not self.elements_nested and not self.attributes:
213213
return
214214

215+
# TODO: Implement test case for this
216+
if value is None:
217+
value = {}
218+
215219
if isinstance(value, ArrayValue):
216220
value = value.as_value_object()
217221

0 commit comments

Comments
 (0)