mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: When restoring, only list apps included in backup
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
1 parent
2a9a220770
commit
481a299250
4 files changed
+60
-4
No files matched your search
@@ -67,9 +67,8 @@ class RestoreForm(forms.Form):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize the form with selectable apps."""
|
||||
apps = kwargs.pop('apps')
|
||||
super().__init__(*args, **kwargs)
|
||||
apps = _list_of_all_apps_for_backup()
|
||||
# TODO: Only list apps included in the backup file.
|
||||
self.fields['selected_apps'].choices = [
|
||||
(app[0], app[1].name) for app in apps]
|
||||
self.fields['selected_apps'].initial = [app[0] for app in apps]
|
||||
Reference in new issue
Block a user