# HG changeset patch # User Felix Wolfsteller # Date 1376900451 -7200 # Node ID 9e81ed5650950c3e7a8abb59619f6d5186376d9e # Parent d02ad36115c675f13fb00dea97eb2f83ad424962# Parent 4937dab5ff7a1b3d4e8c709b21a855c0c2dc74b3 Merged. diff -r 4937dab5ff7a -r 9e81ed565095 backend/src/main/java/org/dive4elements/river/model/CrossSection.java --- a/backend/src/main/java/org/dive4elements/river/model/CrossSection.java Fri Aug 16 11:30:07 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/CrossSection.java Mon Aug 19 10:20:51 2013 +0200 @@ -241,11 +241,19 @@ List results = sqlQuery.list(); - for (Integer result: results) { + if (results.size() >= 1) { + Integer result = results.get(0); if (result == getId()) { return true; } } + else { + logger.warn("No CS found that could be master."); + } + + // TODO If there is none, might need a fallback. + // Formerly this was the most current CS (issue1157). + return false; } }