From 1795916042abd03694f94b4d319673b1e907d5e2 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:54:52 +0530 Subject: [PATCH] fix: debug toolbar import error when running on production setting with DEBUG on (#3085) --- apiserver/plane/urls.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apiserver/plane/urls.py b/apiserver/plane/urls.py index 75b4c2609..e437da078 100644 --- a/apiserver/plane/urls.py +++ b/apiserver/plane/urls.py @@ -19,8 +19,11 @@ urlpatterns = [ if settings.DEBUG: - import debug_toolbar + try: + import debug_toolbar - urlpatterns = [ - re_path(r"^__debug__/", include(debug_toolbar.urls)), - ] + urlpatterns + urlpatterns = [ + re_path(r"^__debug__/", include(debug_toolbar.urls)), + ] + urlpatterns + except ImportError: + pass