Commit de372729 authored by Philipp Hörist's avatar Philipp Hörist

DataForms: Don't remove empty values

Old ejabberd servers dont accept missing value elements in text fields.
This now does not delete the value element anymore if it's empty.
parent 7b7746b7
......@@ -342,10 +342,8 @@ class StringField(DataField):
def value(self, value):
assert isinstance(value, str)
if value == '' and not self.required:
del self.value
if value is None:
value = ''
self.setTagData('value', value)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment