Skip to content

Commit 07403f6

Browse files
committed
Fix #18515: Don't fail in DEBUG mode
When no Redis server is reachable management commands failed without this try...except block.
1 parent 34fa383 commit 07403f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

netbox/core/apps.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ def ready(self):
2828

2929
# Clear Redis cache on startup in development mode
3030
if settings.DEBUG:
31-
cache.clear()
31+
try:
32+
cache.clear()
33+
except Exception:
34+
pass

0 commit comments

Comments
 (0)