| Conditions | 3 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 6 | def move_max_authors(apps, schema_editor): |
||
| 7 | Course = apps.get_model("opensubmit", "Course") |
||
| 8 | for course in Course.objects.all(): |
||
| 9 | max_authors=course.max_authors |
||
| 10 | for assignment in course.assignments.all(): |
||
| 11 | assignment.max_authors=max_authors |
||
| 12 | print("Setting max authors for assignment '{0}' in course '{1}'...".format(assignment.title, course.title)) |
||
| 13 | assignment.save() |
||
| 14 | |||
| 35 |