This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository bow. See http://git.chorem.org/bow.git commit f33801d69591f45cf346e69949f32743afd4563d Author: Benjamin POUSSIN <poussin@codelutin.com> Date: Mon Jul 20 11:04:02 2015 +0200 if no group tag, don't try to search group --- .../bow/action/bookmark/AddOrUpdateAction.java | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java index 25a5177..1265c38 100644 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java +++ b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java @@ -240,25 +240,26 @@ public class AddOrUpdateAction extends BowBaseAction { // add in WikittyAuthorisation.parent all groups (tag start with @) // where current user is member Set<String> groupsName = BowUtils.getGroups(tagsWord); - WikittyQuery groupsQuery = new WikittyQueryMaker().and() - .containsOne(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_NAME, groupsName) - .eq(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_MEMBERS, userId) - .end(); - WikittyQueryResult<String> groupsId = proxy.findAllByQuery(groupsQuery); - bookmark.setParent(new HashSet<String>(groupsId.getAll())); - - if (groupsName.size() != groupsId.size()) { - List<BowGroup> groups = proxy.restore(BowGroup.class, groupsId.getAll()); - for (BowGroup g : groups) { - groupsName.remove(g.getName()); - } - for (String groupName : groupsName) { - bookmark.removeLabels(BowConfig.GROUP_MARK + groupName); + if (CollectionUtils.isNotEmpty(groupsName)) { + WikittyQuery groupsQuery = new WikittyQueryMaker().and() + .containsOne(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_NAME, groupsName) + .eq(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_MEMBERS, userId) + .end(); + WikittyQueryResult<String> groupsId = proxy.findAllByQuery(groupsQuery); + bookmark.setParent(new HashSet<String>(groupsId.getAll())); + + if (groupsName.size() != groupsId.size()) { + List<BowGroup> groups = proxy.restore(BowGroup.class, groupsId.getAll()); + for (BowGroup g : groups) { + groupsName.remove(g.getName()); + } + for (String groupName : groupsName) { + bookmark.removeLabels(BowConfig.GROUP_MARK + groupName); + } + addActionMessage(t("bow.group.not.members", StringUtils.join(groupsName, ", "))); } - addActionMessage(t("bow.group.not.members", StringUtils.join(groupsName, ", "))); } - // Si l'alias prive souhaite est deja utilise on ne l'accept pas // Si l'alias public souhaite est deja utilise on ne l'accept pas if (StringUtils.isBlank(privateAlias)) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.