Fix for resolving scorecards, and replacing dead fk relation

This commit is contained in:
Markus Geiss
2016-11-18 14:29:25 +01:00
parent e79d51ee5a
commit 0a4dc11a87
2 changed files with 51 additions and 2 deletions
@@ -76,7 +76,7 @@ public class ScorecardApiResource {
final List<Scorecard> scorecards = this.scorecardService.findBySurvey(survey);
if (scorecards == null) {
if (scorecards != null) {
return ScorecardMapper.map(scorecards);
}
@@ -105,7 +105,7 @@ public class ScorecardApiResource {
final Survey survey = findSurvey(surveyId);
final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId);
final List<Scorecard> scorecards = this.scorecardService.findBySurveyAndClient(survey, client);
if (scorecards == null) {
if (scorecards != null) {
return ScorecardMapper.map(scorecards);
}
return Collections.EMPTY_LIST;