Skip to content
Snippets Groups Projects
Commit 29c6f0ba authored by Philipp Hörist's avatar Philipp Hörist
Browse files

AccountWizard: Fix method call

parent d64b578c
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ def get_certificates(self):
return list(self._certs)
def add_certificate(self, certificate):
log.info('Add certificate to trust store')
pem = certificate.props.certificate_pem
path = self._get_random_path()
write_file_async(path,
......
......@@ -121,7 +121,7 @@ def _on_button_clicked(self, _assistant, button_name):
self._test_credentials()
elif page == 'security-warning':
if self.get_page('security-warning').is_add_to_trusted:
if self.get_page('security-warning').trust_certificate:
app.cert_store.add_certificate(
self.get_page('security-warning').cert)
self._test_credentials(ignore_all_errors=True)
......@@ -141,7 +141,7 @@ def _on_button_clicked(self, _assistant, button_name):
self._register_with_server()
elif page == 'security-warning':
if self.get_page('security-warning').is_add_to_trusted:
if self.get_page('security-warning').trust_certificate:
app.cert_store.add_certificate(
self.get_page('security-warning').cert)
self._register_with_server(ignore_all_errors=True)
......@@ -727,7 +727,8 @@ def _on_view_cert(self, _button):
transient_for=self.get_toplevel(),
cert=self._cert)
def is_add_to_trusted(self):
@property
def trust_certificate(self):
return self._ui.trust_cert_checkbutton.get_active()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment