Set unset part of a JID to empty string instead of None
it breaks assumptions on the type of the value
This commit is contained in:
parent
b88d2ecd77
commit
cf3f36ac52
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ def _validate_node(node):
|
|||
:returns: The local portion of a JID, as validated by nodeprep.
|
||||
"""
|
||||
if node is None:
|
||||
return None
|
||||
return ''
|
||||
|
||||
try:
|
||||
node = nodeprep(node)
|
||||
|
@ -160,7 +160,7 @@ def _validate_resource(resource):
|
|||
:returns: The local portion of a JID, as validated by resourceprep.
|
||||
"""
|
||||
if resource is None:
|
||||
return None
|
||||
return ''
|
||||
|
||||
try:
|
||||
resource = resourceprep(resource)
|
||||
|
|
Loading…
Reference in a new issue