diff --git a/karmaworld/apps/courses/views.py b/karmaworld/apps/courses/views.py index 873da73c..6ba46324 100644 --- a/karmaworld/apps/courses/views.py +++ b/karmaworld/apps/courses/views.py @@ -81,7 +81,7 @@ def get_context_data(self, **kwargs): for course in self.object_list: if course.school: schools.add(course.school) - elif course.department.school: + elif course.department and course.department.school: schools.add(course.department.school) context['schools'] = sorted(list(schools), key=lambda x: x.name) diff --git a/karmaworld/templates/header.html b/karmaworld/templates/header.html index 162fc342..8d764242 100644 --- a/karmaworld/templates/header.html +++ b/karmaworld/templates/header.html @@ -38,6 +38,7 @@

Log Out {% else %}
  • Sign Up
  • +
  • Log In
  • {% endif %}