Skip to content

Commit

Permalink
Merge pull request #30 from krgauraw/release-6.0.0
Browse files Browse the repository at this point in the history
Issue #IQ-478 fix: code changes for answer validation
  • Loading branch information
sajeshkayyath authored Jun 20, 2023
2 parents 80c5d05 + 87bc115 commit b26d45e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ trait QuestionPublisher extends ObjectReader with ObjectValidator with ObjectEnr
} else {
if (obj.extData.getOrElse(Map()).getOrElse("answer", "").asInstanceOf[String].isEmpty) messages += s"""There is no answer available for : $identifier"""
}
if (interactionTypes.nonEmpty && StringUtils.equalsIgnoreCase("1.1", obj.metadata.getOrElse("schemaVersion", "1.0").asInstanceOf[String])) {
if(!StringUtils.equalsIgnoreCase("1.1", obj.metadata.getOrElse("schemaVersion", "1.0").asInstanceOf[String])
&& obj.extData.getOrElse(Map()).getOrElse("editorState", "").asInstanceOf[String].isEmpty)
messages += s"""There is no editorState available for : $identifier"""

/*if (interactionTypes.nonEmpty && StringUtils.equalsIgnoreCase("1.1", obj.metadata.getOrElse("schemaVersion", "1.0").asInstanceOf[String])) {
if (obj.extData.getOrElse(Map()).getOrElse("answer", "").asInstanceOf[String].isEmpty) messages += s"""There is no answer available for : $identifier"""
} else if (obj.extData.getOrElse(Map()).getOrElse("editorState", "").asInstanceOf[String].isEmpty) messages += s"""There is no editorState available for : $identifier"""
} else if (obj.extData.getOrElse(Map()).getOrElse("editorState", "").asInstanceOf[String].isEmpty) messages += s"""There is no editorState available for : $identifier"""*/
messages.toList
}

Expand Down

0 comments on commit b26d45e

Please sign in to comment.