From: Guillaume Pellerin Date: Tue, 19 Nov 2013 15:01:41 +0000 (+0100) Subject: fix module X-Git-Tag: 1.3-TC~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=755611344d685a6242559e20d28c29d04a0d9ed6;p=teleforma.git fix module --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 4babc1d8..8d7e06cb 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -236,6 +236,7 @@ class CourseListView(CourseAccessMixin, ListView): @jsonrpc_method('teleforma.get_course_list') def get_course_list(request, organization_name, department_name): + from teleforma.models import Organization, Department organization = Organization.objects.get(name=organization_name) department = Department.objects.get(organization=organization, name=department_name) return [course.to_dict() for course in Course.objects.filter(department=department)]