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() {