mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
stepic user could be null
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ public class EduStepicConnector {
|
||||
}
|
||||
|
||||
public static boolean enrollToCourse(final int courseId, final StepicUser stepicUser) {
|
||||
if (stepicUser != null && stepicUser.getAccessToken() == null) return false;
|
||||
if (stepicUser == null || stepicUser.getAccessToken() == null) return false;
|
||||
HttpPost post = new HttpPost(EduStepicNames.STEPIC_API_URL + EduStepicNames.ENROLLMENTS);
|
||||
try {
|
||||
final StepicWrappers.EnrollmentWrapper enrollment = new StepicWrappers.EnrollmentWrapper(String.valueOf(courseId));
|
||||
|
||||
Reference in New Issue
Block a user