Explorar o código

fix that account with just adding permission couldn't open index page of admin system (#144)

Denis K %!s(int64=8) %!d(string=hai) anos
pai
achega
d80420a5bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      jet/templatetags/jet_tags.py

+ 1 - 1
jet/templatetags/jet_tags.py

@@ -92,7 +92,7 @@ def jet_get_menu(context):
     for app in app_list:
         if not current_found:
             for model in app['models']:
-                if context['request'].path.startswith(model['admin_url']):
+                if 'admin_url' in model and context['request'].path.startswith(model['admin_url']):
                     model['current'] = True
                     current_found = True
                     break