Skip to content
Snippets Groups Projects
Commit 061967f7 authored by User expired's avatar User expired
Browse files

openolat#95: check if the precondition is null before trying to replace the...

openolat#95: check if the precondition is null before trying to replace the ids in the migration process
parent a738df18
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ import java.util.Arrays; ...@@ -24,7 +24,6 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import org.olat.core.CoreSpringFactory; import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.translator.Translator;
import org.olat.core.id.Identity; import org.olat.core.id.Identity;
import org.olat.course.condition.Condition; import org.olat.course.condition.Condition;
import org.olat.course.condition.KeyAndNameConverter; import org.olat.course.condition.KeyAndNameConverter;
...@@ -135,8 +134,10 @@ public class AbstractCourseNodeCopyConfigurator implements ICourseNodeCopyConfig ...@@ -135,8 +134,10 @@ public class AbstractCourseNodeCopyConfigurator implements ICourseNodeCopyConfig
preCondition.setEasyModeNodePassedId(easyModeNodePassedId); preCondition.setEasyModeNodePassedId(easyModeNodePassedId);
} }
if (preCondition.isExpertMode()) { if (preCondition.isExpertMode()) {
preCondition.setConditionExpression( if (preCondition.getConditionExpression() != null) {
preCondition.setConditionExpression(
replaceIdsInCondition(preCondition.getConditionExpression())); replaceIdsInCondition(preCondition.getConditionExpression()));
}
} else { } else {
preCondition.setConditionExpression( preCondition.setConditionExpression(
preCondition.getConditionFromEasyModeConfiguration()); preCondition.getConditionFromEasyModeConfiguration());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment