You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2020/08/20 07:19:44 UTC

[incubator-dlab] branch develop updated: [DLAB-2001] Do not show libraries with invalid name while creating image

This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/develop by this push:
     new d1b931c  [DLAB-2001] Do not show libraries with invalid name while creating image
d1b931c is described below

commit d1b931c0a951c8c59e76b5e38701f315a5f6b8b8
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Thu Aug 20 10:15:13 2020 +0300

    [DLAB-2001] Do not show libraries with invalid name while creating image
---
 .../src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
index d96f069..626e275 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
 import java.util.List;
@@ -395,7 +396,7 @@ public class ExploratoryLibDAO extends BaseDAO {
 		return ((List<Document>) libsDocument.getOrDefault(libFieldName, Collections.emptyList()))
 				.stream()
 				.map(d -> convertFromDocument(d, Library.class))
-				.filter(library -> LibStatus.INVALID_VERSION != library.getStatus())
+				.filter(library -> !Arrays.asList(LibStatus.INVALID_VERSION, LibStatus.INVALID_NAME).contains(library.getStatus()))
 				.peek(l -> l.withType(libType).withResourceName(resourceName));
 	}
 }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org