From 39ba51b5f91ff2f2b5f4a85c8a4ce114ff27ff08 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 30 Jan 2023 10:52:50 -0800 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/modules/email/views.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/plinth/modules/email/views.py b/plinth/modules/email/views.py index 2f48354bb..bac67c3b2 100644 --- a/plinth/modules/email/views.py +++ b/plinth/modules/email/views.py @@ -25,22 +25,14 @@ class EmailAppView(AppView): def get_context_data(self, **kwargs): """Add additional context data for rendering the template.""" context = super().get_context_data(**kwargs) - try: # Handle error during uninstall of app - context['dns_entries'] = dns.get_entries() - except FileNotFoundError: - pass - + context['dns_entries'] = dns.get_entries() return context def get_initial(self): """Return the initial values to populate in the form.""" initial = super().get_initial() - try: # Handle error during uninstall of app - domains = privileged.domain.get_domains() - initial['primary_domain'] = domains['primary_domain'] - except FileNotFoundError: - pass - + domains = privileged.domain.get_domains() + initial['primary_domain'] = domains['primary_domain'] return initial def form_valid(self, form):