Skip to content

Commit 337a3c9

Browse files
committed
fix #2 get 500 when exchange menu
1 parent 97e11c7 commit 337a3c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adminlteui/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ def exchange_menu_view(self, request):
237237
use_custom_menu = Options.objects.get(
238238
option_name='USE_CUSTOM_MENU')
239239
except Options.DoesNotExist:
240-
use_custom_menu = None
240+
use_custom_menu = Options.objects.create(
241+
option_name='USE_CUSTOM_MENU', option_value='0'
242+
)
241243

242244
if not use_custom_menu or use_custom_menu.option_value == '0':
243245
use_custom_menu.option_value = '1'

0 commit comments

Comments
 (0)