mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 19:36:26 -06:00
fix db maintenance mode exception #12966
This commit is contained in:
parent
abaf20ae7b
commit
99e08a7387
@ -203,7 +203,7 @@ class MaintenanceModeMiddleware:
|
|||||||
"""
|
"""
|
||||||
Prevent any write-related database operations if an exception is raised.
|
Prevent any write-related database operations if an exception is raised.
|
||||||
"""
|
"""
|
||||||
if isinstance(exception, InternalError):
|
if get_config().MAINTENANCE_MODE and isinstance(exception, InternalError):
|
||||||
error_message = 'NetBox is currently operating in maintenance mode and is unable to perform write ' \
|
error_message = 'NetBox is currently operating in maintenance mode and is unable to perform write ' \
|
||||||
'operations. Please try again later.'
|
'operations. Please try again later.'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user