소스 검색

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

Denis K 8 년 전
부모
커밋
d80420a5bc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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