network: Don't try to get secrets for new connections

We don't need secrets for new connections and, in fact, trying to
retrieve secrets in that case will fail because we have a plain
NMConnection instead of a NMRemoteConnection.

The above mentioned error would result in the page never being
initialized.
This commit is contained in:
Rui Matos 2016-01-26 18:35:52 +01:00
parent 62683047c5
commit 2e6149b4b8

View file

@ -553,7 +553,7 @@ net_connection_editor_set_connection (NetConnectionEditor *editor,
const gchar *security_setting;
security_setting = ce_page_get_security_setting (page);
if (!security_setting) {
if (!security_setting || editor->is_new_connection) {
ce_page_complete_init (page, NULL, NULL, NULL);
} else {
get_secrets_for_page (editor, page, security_setting);