Commits

David Jean Louis committed fcfdae9

Fixed missing context in _get_dashboard_cls()

  • Participants
  • Parent commits 57d7a9f

Comments (0)

Files changed (1)

File admin_tools/dashboard/utils.py

         return get_app_index_dashboard(context)
     raise ValueError('Invalid dashboard location: "%s"' % location)
 
-def _get_dashboard_cls(dashboard_cls):
+def _get_dashboard_cls(dashboard_cls, context):
     if type(dashboard_cls) is types.DictType:
         curr_url = context.get('request').META['PATH_INFO']
         for key in dashboard_cls:
         settings,
         'ADMIN_TOOLS_INDEX_DASHBOARD',
         'admin_tools.dashboard.dashboards.DefaultIndexDashboard'
-    ))()
+    ), context)()
 
 def get_app_index_dashboard(context):
     """
         settings,
         'ADMIN_TOOLS_APP_INDEX_DASHBOARD',
         'admin_tools.dashboard.dashboards.DefaultAppIndexDashboard'
-    ))(app_title, model_list)
+    ), context)(app_title, model_list)