Bug on optional attributes generation fixed
authorlbessard
Mon, 10 Sep 2007 09:00:50 +0200
changeset 88 bac6435df86f
parent 87 ce2607713931
child 89 a6ff2b3fcc25
Bug on optional attributes generation fixed
xmlclass/xmlclass.py
--- a/xmlclass/xmlclass.py	Mon Sep 10 08:37:04 2007 +0200
+++ b/xmlclass/xmlclass.py	Mon Sep 10 09:00:50 2007 +0200
@@ -749,7 +749,7 @@
                     computed_value = ComputeValue(value)
                 else:
                     computed_value = None
-                if values[2] != "optional" or value != computed_value:
+                if values[2] != "optional" or (value != None and computed_value != values[3]):
                     if len(bases) > 0:
                         base_extras[attr] = value
                     else: