use last subtask index instead of subtask number
[idea/community.git] / python / educational-python / course-creator-python / src / com / jetbrains / edu / coursecreator / PyCCLanguageManager.java
index d0c342227b94f3ad0775ae416f59f9631b0f2d1d..6748590975f13c553b5ef9cbcab21f71b30969db 100644 (file)
@@ -70,7 +70,7 @@ public class PyCCLanguageManager implements CCLanguageManager {
       return;
     }
 
-    int prevSubtaskIndex = task.getSubtaskNum() - 1;
+    int prevSubtaskIndex = task.getLastSubtaskIndex();
     String name = prevSubtaskIndex == 0 ? EduNames.TESTS_FILE : getSubtaskTestsFileName(prevSubtaskIndex);
     VirtualFile testsFile = taskDir.findChild(name);
     if (testsFile == null) {