Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
de372729 by Philipp Hörist at 2019-07-26T08:28:12Z
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.
- - - - -
1 changed file:
- nbxmpp/modules/dataforms.py
Changes:
=====================================
nbxmpp/modules/dataforms.py
=====================================
@@ -342,10 +342,8 @@ class StringField(DataField):
@value.setter
def value(self, value):
- assert isinstance(value, str)
- if value == '' and not self.required:
- del self.value
- return
+ if value is None:
+ value = ''
self.setTagData('value', value)
@value.deleter
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/de3727290a8c22c5a8aa165531bea0b64319020a
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/de3727290a8c22c5a8aa165531bea0b64319020a
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits