mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +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):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
"""Redirect to setup page if setup is not done yet."""
|
"""Redirect to setup page if setup is not done yet."""
|
||||||
if not matrixsynapse.is_setup():
|
status = self.get_common_status()
|
||||||
return redirect('matrixsynapse:setup')
|
if status['is_enabled']:
|
||||||
|
# App is disabled when uninstalling
|
||||||
|
if not matrixsynapse.is_setup():
|
||||||
|
return redirect('matrixsynapse:setup')
|
||||||
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user