]> git.parisson.com Git - teleforma.git/commitdiff
fix pull courses for each department
authoryomguy <yomguy@parisson.com>
Wed, 19 Feb 2014 01:04:48 +0000 (02:04 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 19 Feb 2014 01:04:48 +0000 (02:04 +0100)
teleforma/views/core.py

index f05c5129070cdd485e4b50720cb1128bf30217e2..12e52ab14d75ee42a7651e4f592db0323a9bed3d 100644 (file)
@@ -250,7 +250,7 @@ class CourseListView(CourseAccessMixin, ListView):
             s = ServiceProxy(url)
             remote_list = s.teleforma.get_course_list(organization_name, department.name)
             for course_dict in remote_list['result']:
-                course = Course.objects.filter(code=course_dict['code'])
+                course = Course.objects.filter(code=course_dict['code'], department=department)
                 if not course:
                     course = Course()
                 else: