xmlclass/xmlclass.py
changeset 3302 c89fc366bebd
parent 3288 8f3cb4b47cbb
child 3589 a0b645a934c9
--- a/xmlclass/xmlclass.py	Wed Jun 30 15:44:32 2021 +0200
+++ b/xmlclass/xmlclass.py	Thu Sep 02 21:36:29 2021 +0200
@@ -1522,7 +1522,7 @@
                     raise ValueError("Wrong path!")
                 if attributes[parts[0]]["attr_type"]["basename"] == "boolean":
                     setattr(self, parts[0], value)
-                elif attributes[parts[0]]["use"] == "optional" and value == "":
+                elif attributes[parts[0]]["use"] == "optional" and value == None:
                     if "default" in attributes[parts[0]]:
                         setattr(self, parts[0],
                                 attributes[parts[0]]["attr_type"]["extract"](