Skip to content

Commit

Permalink
Fixed a condition when the execution description is not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
itaiag committed Mar 7, 2016
1 parent 0bc9d20 commit 2fd5c0f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.elasticsearch.common.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;
Expand Down Expand Up @@ -66,7 +67,11 @@ public DataTable get(@PathParam("execution") int execution) {
for (ExecutionMetaData meta : metaData) {
final Map<String, Object> row = new HashMap<String, Object>();
row.put(ID, meta.getId());
row.put(DESCRIPTION, meta.getDescription());
if (!StringUtils.isEmpty(meta.getDescription())){
row.put(DESCRIPTION, meta.getDescription());
} else {
row.put(DESCRIPTION, meta.getFolderName());
}
row.put(LINK, meta.getUri());
row.put(DATE, meta.getDate());
row.put(TIME, meta.getTime());
Expand Down

0 comments on commit 2fd5c0f

Please sign in to comment.