Fix backup/restore

This commit is contained in:
Bilal Elmoussaoui 2019-06-07 02:07:49 +00:00
parent 476a9a9f35
commit 9bbc478f7f

View file

@ -251,14 +251,16 @@ class Application(Gtk.Application):
@staticmethod
def _on_import_json(*_):
from Authenticator.models import BackupJSON, import_json
from Authenticator.models import BackupJSON
from Authenticator.widgets import import_json
filename = import_json(Window.get_default())
if filename:
BackupJSON.import_file(filename)
@staticmethod
def _on_export_json(*_):
from Authenticator.models import BackupJSON, export_json
from Authenticator.models import BackupJSON
from Authenticator.widgets import export_json
filename = export_json(Window.get_default())
if filename:
BackupJSON.export_file(filename)