mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
networks: Minor update to primary connection fix
To make sure 'primary' key is always available in status.
This commit is contained in:
parent
8e4abf282f
commit
db7ed51e53
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user