Skip to content

Commit 9ba89e9

Browse files
delsimGibbsConsulting
authored andcommitted
Handle missing PLOTLY_DASH settings gracefully (#24)
1 parent c71e864 commit 9ba89e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

django_plotly_dash/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
from django.conf import settings
66

77
def _get_settings():
8-
pd_settings = settings.PLOTLY_DASH
9-
return pd_settings if pd_settings else {}
8+
try:
9+
return settings.PLOTLY_DASH
10+
except AttributeError:
11+
return {}
1012

1113
def pipe_ws_endpoint_name():
1214
'Return the endpoint for pipe websocket connections'

0 commit comments

Comments
 (0)