From 4820c6fc84bcefe296ee4a0720f8f0cc4a1173da Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <code@dgerhardt.net> Date: Tue, 4 Jul 2017 17:49:52 +0200 Subject: [PATCH] Fix complex key for database view query Additionally, removed obsolete TODO comment. --- src/main/java/de/thm/arsnova/dao/CouchDBDao.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java index e7f5dcf4a..763a2dacf 100644 --- a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java +++ b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java @@ -205,7 +205,6 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware @Override public List<Session> getPublicPoolSessions() { - // TODO replace with new view final View view = new View("session/partial_by_ppsubject_name_for_publicpool"); final ViewResults sessions = getDatabase().view(view); @@ -1847,7 +1846,7 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware public List<Question> getFlashcardsForTeachers(final Session session) { final View view = new View("content/doc_by_sessionid_variant_active"); view.setStartKeyArray(session.get_id(), "flashcard"); - view.setEndKeyArray(session.get_id(), "{}"); + view.setEndKeyArray(session.get_id(), "flashcard", "{}"); return getQuestions(view, session); } -- GitLab