mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
matrixsynapse: Prevent setup page from being shown during uninstall
Fixes: #2381. When app is being uninstalled, it is disabled. Use that to not show the setup page. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
1612318b60
commit
8d0455aa45
@ -53,8 +53,11 @@ class MatrixSynapseAppView(AppView):
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
"""Redirect to setup page if setup is not done yet."""
|
||||
if not matrixsynapse.is_setup():
|
||||
return redirect('matrixsynapse:setup')
|
||||
status = self.get_common_status()
|
||||
if status['is_enabled']:
|
||||
# App is disabled when uninstalling
|
||||
if not matrixsynapse.is_setup():
|
||||
return redirect('matrixsynapse:setup')
|
||||
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user