From 0aedc1a7d0fb25e4ef7cc593d95d7d9ceee2a36e Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 9 Nov 2019 13:41:12 -0400 Subject: [PATCH] Prevent "failed to convert null" qt warning --- src/python/matrix_client.py | 4 ++-- src/qml/Pages/AddChat/CreateRoom.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index a778be01..5ff811e0 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -458,8 +458,8 @@ class MatrixClient(nio.AsyncClient): ) -> str: response = await super().room_create( - name = name, - topic = topic, + name = name or None, + topic = topic or None, federate = federate, visibility = nio.RoomVisibility.public if public else diff --git a/src/qml/Pages/AddChat/CreateRoom.qml b/src/qml/Pages/AddChat/CreateRoom.qml index f0b5b341..9771fc41 100644 --- a/src/qml/Pages/AddChat/CreateRoom.qml +++ b/src/qml/Pages/AddChat/CreateRoom.qml @@ -20,8 +20,8 @@ HBox { errorMessage.text = "" let args = [ - nameField.text || null, - topicField.text || null, + nameField.text, + topicField.text, publicCheckBox.checked, encryptCheckBox.checked, ! blockOtherServersCheckBox.checked,