From 33676cf1653f2053f57a9e0ecd5c8bda6c64d986 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 22 Dec 2022 16:22:52 +0300 Subject: User info updates fix --- src/main/java/com/juick/service/UserServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index 4158561c..b5581b76 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -390,7 +390,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { return user; } - @Transactional @Override public boolean updateUserInfo(final User info) { try { @@ -401,7 +400,8 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { info.getCountry(), info.getUrl(), info.getDescription()) > 0; - } catch (DataIntegrityViolationException e) { + } catch (Exception e) { + // pgjdbc 42.x do not use SQLException return getJdbcTemplate().update("UPDATE usersinfo SET fullname = ?, country = ?, url = ?, descr = ? WHERE user_id = ?", info.getFullName(), info.getCountry(), -- cgit v1.2.3