Commit eb85c89d authored by Daniel Gerhardt's avatar Daniel Gerhardt

Fix migration of content's solution/hint

The solution text is no longer preferred over the hint text if it is an
empty String.
parent da03566b
......@@ -258,10 +258,10 @@ public class FromV2Migrator {
to.setBody(from.getText());
to.setAbstentionsAllowed(from.isAbstention());
to.setAbstentionsAllowed(from.isAbstention());
if (from.getSolution() != null) {
if (from.getSolution() != null && !from.getSolution().isEmpty()) {
to.setAdditionalText(from.getSolution());
to.setAdditionalTextTitle("Solution");
} else if (from.getHint() != null) {
} else if (from.getHint() != null && !from.getHint().isEmpty()) {
to.setAdditionalText(from.getHint());
to.setAdditionalTextTitle("Hint");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment