]> git.parisson.com Git - teleforma.git/commitdiff
fix module
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 19 Nov 2013 15:01:41 +0000 (16:01 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 19 Nov 2013 15:02:55 +0000 (16:02 +0100)
Conflicts:
teleforma/views/core.py

teleforma/views/core.py

index cdf15472e050f24ec09e88f375b2a727ab20eb17..37608b5abcb5f923f53d96fffa41484f69bf1c25 100644 (file)
@@ -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):