fixed attribute error

This commit is contained in:
Abhimanyu Saharan 2023-05-05 02:39:38 +05:30
parent 986618a864
commit 37fe70d60e

View File

@ -180,7 +180,7 @@ class MaintenanceModeMiddleware:
self.get_response = get_response
def __call__(self, request):
if settings.MAINTENANCE_MODE:
if getattr(settings, 'MAINTENANCE_MODE', False):
self._prevent_db_write_operations()
return self.get_response(request)