diff --git a/plinth/modules/networks/templates/connection_show.html b/plinth/modules/networks/templates/connection_show.html index 9d6d63902..f1993d992 100644 --- a/plinth/modules/networks/templates/connection_show.html +++ b/plinth/modules/networks/templates/connection_show.html @@ -146,7 +146,7 @@
{% trans "Mode" %} - {{ device.wireless.mode_string }} + {{ connection.wireless.mode_string }}
{% endif %} {% if access_point.channel %} diff --git a/plinth/modules/networks/views.py b/plinth/modules/networks/views.py index 96a6437af..4dbe18bb8 100644 --- a/plinth/modules/networks/views.py +++ b/plinth/modules/networks/views.py @@ -187,7 +187,8 @@ def show(request, uuid): device, connection_status['wireless']['ssid']) connection_status['wireless'][ 'mode_string'] = WIRELESS_MODE_STRINGS.get( - connection['wireless']['mode'], connection['wireless']['mode']) + connection_status['wireless']['mode'], + connection_status['wireless']['mode']) return TemplateResponse( request, 'connection_show.html', { diff --git a/plinth/network.py b/plinth/network.py index e4c8d1222..ac6296490 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -111,7 +111,9 @@ def get_status_from_connection(connection): if status['type'] == '802-11-wireless': setting_wireless = connection.get_setting_wireless() - status['wireless']['ssid'] = setting_wireless.get_ssid().get_data() + status['wireless']['ssid'] = setting_wireless.get_ssid().get_data( + ).decode() + status['wireless']['mode'] = setting_wireless.get_mode() return status