From babb3a50a1c7e6101980a9577364b169b5c6654c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 9 Aug 2018 18:21:51 +0300 Subject: Fix attachments errors --- juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com/juick') diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java index f79e4142..054503c1 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -118,7 +118,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ insertMap.put("user_id", uid); Instant now = Instant.now(); insertMap.put("ts", Timestamp.from(now)); - if (attachment != null) { + if (StringUtils.isNotEmpty(attachment)) { insertMap.put("attach", attachment); } int mid = simpleJdbcInsert.executeAndReturnKey(insertMap).intValue(); -- cgit v1.2.3