diff --git a/plinth/network.py b/plinth/network.py index 7075c21b9..6350ceb51 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -102,9 +102,10 @@ def get_status_from_connection(connection): status['wireless']['ssid'] = setting_wireless.get_ssid().get_data() primary_connection = nm.Client.new(None).get_primary_connection() - if primary_connection: - status['primary'] = (primary_connection.get_uuid() == - connection.get_uuid()) + status['primary'] = ( + primary_connection and + primary_connection.get_uuid() == connection.get_uuid() + ) return status