mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Backups: allow creating archive in unmounted repository
- mount repository if necessary before creating an archive Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
067fea7d17
commit
b2f5d68ca6
2 files changed
+4
-3
No files matched your search
@@ -92,7 +92,8 @@ class CreateArchiveView(SuccessMessageMixin, FormView):
|
||||
|
||||
def form_valid(self, form):
|
||||
"""Create the archive on valid form submission."""
|
||||
repository = get_repository(form.cleaned_data['repository'])
|
||||
repository = get_repository(form.cleaned_data['repository'],
|
||||
automount=True)
|
||||
name = datetime.now().strftime('%Y-%m-%d:%H:%M')
|
||||
repository.create_archive(name, form.cleaned_data['selected_apps'])
|
||||
return super().form_valid(form)
|
||||
|
||||
Reference in new issue
Block a user