From a3ea073b4973d11fdf051bd4dc3f407378e11aa2 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Tue, 29 Apr 2014 21:29:00 -0400 Subject: [PATCH] Fix two tiny bugs --- karmaworld/apps/courses/views.py | 2 +- karmaworld/templates/header.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/karmaworld/apps/courses/views.py b/karmaworld/apps/courses/views.py index 873da73..6ba4632 100644 --- a/karmaworld/apps/courses/views.py +++ b/karmaworld/apps/courses/views.py @@ -81,7 +81,7 @@ class CourseListSubView(ListView): 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 162fc34..8d76424 100644 --- a/karmaworld/templates/header.html +++ b/karmaworld/templates/header.html @@ -38,6 +38,7 @@
  • Log Out
  • {% else %}
  • Sign Up
  • +
  • Log In
  • {% endif %} -- 2.25.1