Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- fixed test
  • Loading branch information
temi committed Mar 28, 2024
1 parent cb01b50 commit eeac1d9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class ParatooProtocolConfig {
}

String getStartDate(Map surveyData) {
if(startDatePath == null || surveyData == null) {
return null
}

String date = getProperty(surveyData, startDatePath)
if (date == null) {
date = getPropertyFromSurvey(surveyData, startDatePath)
Expand All @@ -58,6 +62,10 @@ class ParatooProtocolConfig {
}

String getEndDate(Map surveyData) {
if(endDatePath == null || surveyData == null) {
return null
}

String date = getProperty(surveyData, endDatePath)
if (date == null) {
date = getPropertyFromSurvey(surveyData, endDatePath)
Expand All @@ -67,6 +75,10 @@ class ParatooProtocolConfig {
}

Map getSurveyId(Map surveyData) {
if(surveyIdPath == null || surveyData == null) {
return null
}

Map result = getProperty(surveyData, surveyIdPath)
if (result == null) {
result = getPropertyFromSurvey(surveyData, surveyIdPath)
Expand Down

0 comments on commit eeac1d9

Please sign in to comment.