From 49aa2ef845dc03fcbe710be214597737e23f8854 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Thu, 1 Jul 2021 14:57:58 +0100 Subject: [PATCH] Fix query for oldest (un-swapped) project --- .../bridge/db/sqlite/query/GetOldestProjectName.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/db/sqlite/query/GetOldestProjectName.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/db/sqlite/query/GetOldestProjectName.java index 73507f2d73..1128a53c01 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/db/sqlite/query/GetOldestProjectName.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/db/sqlite/query/GetOldestProjectName.java @@ -12,7 +12,8 @@ public class GetOldestProjectName implements SQLQuery { private static final String GET_OLDEST_PROJECT_NAME = "SELECT `name`, MIN(`last_accessed`)\n" + - " FROM `projects`"; + " FROM `projects` \n" + + " WHERE `last_accessed` IS NOT NULL;"; @Override public String getSQL() {