remove parent tag after tag deletion

This commit is contained in:
Benjamin Gamard 2018-03-10 17:04:20 +01:00
parent 77311f42cd
commit 2b6a14a348

View File

@ -131,6 +131,10 @@ public class TagDao {
q.setParameter("dateNow", dateNow);
q.executeUpdate();
q = em.createQuery("update Tag t set t.parentId = null where t.parentId = :tagId and t.deleteDate is null");
q.setParameter("tagId", tagId);
q.executeUpdate();
// Create audit log
AuditLogUtil.create(tagDb, AuditLogType.DELETE, userId);
}