From: Guillaume Pellerin Date: Tue, 19 Nov 2013 15:01:41 +0000 (+0100) Subject: fix module X-Git-Tag: 2.8.1-ae~106 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7e4743f79e34d3b5da1775720126ed97ce25b813;p=teleforma.git fix module Conflicts: teleforma/views/core.py --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index cdf15472..37608b5a 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -232,8 +232,10 @@ class CourseListView(CourseAccessMixin, ListView): return super(CourseListView, self).dispatch(*args, **kwargs) @jsonrpc_method('teleforma.get_course_list') - def get_course_list(request, department_id): - department = Department.objects.get(id=department_id) + 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)] def pull(request, organization_name, department_name):