Permalink
Browse files

Don't use None as a value in the setter if it will be returned as u'N…

…one' by the getter.

svn path=/src/trunk/spelt/; revision=10220
  • Loading branch information...
1 parent a856548 commit 4dcad07e61896cd8081935c72094cee1805c246e Walter Leibbrandt committed Feb 19, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 spelt/models/xml_model.py
View
2 spelt/models/xml_model.py
@@ -106,6 +106,8 @@ def __setattr__(self, name, value):
return
self.elem.set(name, str(value))
elif name in self.values:
+ if value is None:
+ value = u''
setattr(self.elem, name, value)
super(XMLModel, self).__setattr__(name, value)

0 comments on commit 4dcad07

Please sign in to comment.