From: Guillaume Pellerin Date: Tue, 19 Nov 2013 15:01:41 +0000 (+0100) Subject: fix module X-Git-Tag: 1.1~503 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d867949e662c34d512a865b7c78990efeed1e18d;p=teleforma.git fix module --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 23ccc35d..ae44a4b4 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -240,6 +240,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)]