Commit 3b99ded7 authored by Grzegorz Pietrusza's avatar Grzegorz Pietrusza

refactor isAlreadySubmittedSolution

parent aee95e8d
......@@ -51,9 +51,10 @@ public class SolutionsRepository extends Repository<Solution>
public boolean isAlreadySubmittedSolution(Solution solution)
{
return datastore.find(Solution.class)
return !datastore.find(Solution.class)
.filter("flag.value", solution.getFlag().getValue())
.get() != null;
.asList()
.isEmpty();
}
public List<Integer> getCompletedTasks(Team team)
......
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