JID: Make node and resource setters accept None
This is the proper way to unset these.
This commit is contained in:
parent
1f47acaec1
commit
1caada197a
1 changed files with 2 additions and 2 deletions
|
@ -368,7 +368,7 @@ class JID:
|
|||
return self._node
|
||||
|
||||
@node.setter
|
||||
def node(self, value: str):
|
||||
def node(self, value: Optional[str]):
|
||||
self._node = _validate_node(value)
|
||||
self._update_bare_full()
|
||||
|
||||
|
@ -386,7 +386,7 @@ class JID:
|
|||
return self._resource
|
||||
|
||||
@resource.setter
|
||||
def resource(self, value: str):
|
||||
def resource(self, value: Optional[str]):
|
||||
self._resource = _validate_resource(value)
|
||||
self._update_bare_full()
|
||||
|
||||
|
|
Loading…
Reference in a new issue