mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
email: Revert workaround for error on finishing uninstall
This reverts commit 82104ccf847531944b32810f677cc6cc5c36ccc8. Due to implementation of a proper view for showing an app with operations, this workaround should no longer be needed. AppView should not used during or after the uninstall step. Tests: - Functional tests for email pass. - Refreshing the email app page during uninstall does not lead to an error. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
f2ecd3c46e
commit
39ba51b5f9
@ -25,22 +25,14 @@ class EmailAppView(AppView):
|
|||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
"""Add additional context data for rendering the template."""
|
"""Add additional context data for rendering the template."""
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
try: # Handle error during uninstall of app
|
context['dns_entries'] = dns.get_entries()
|
||||||
context['dns_entries'] = dns.get_entries()
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
"""Return the initial values to populate in the form."""
|
"""Return the initial values to populate in the form."""
|
||||||
initial = super().get_initial()
|
initial = super().get_initial()
|
||||||
try: # Handle error during uninstall of app
|
domains = privileged.domain.get_domains()
|
||||||
domains = privileged.domain.get_domains()
|
initial['primary_domain'] = domains['primary_domain']
|
||||||
initial['primary_domain'] = domains['primary_domain']
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return initial
|
return initial
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user