Skip to content
Snippets Groups Projects
Commit a8181b44 authored by srosse's avatar srosse
Browse files

OO-4321: show only valid offer in the groups list

parent 9716c837
No related branches found
No related tags found
No related merge requests found
......@@ -1266,11 +1266,12 @@ public class BusinessGroupDAO {
StringBuilder so = new StringBuilder();
so.append("select access.method, resource.key, offer.price from acofferaccess access ")
.append(" inner join access.offer offer")
.append(" inner join offer.resource resource");
.append(" inner join offer.resource resource")
.append(" where offer.valid=true");
if(resourceKeyToGroup.size() < OFFERS_IN_LIMIT) {
so.append(" where resource.key in (:resourceKeys)");
so.append(" and resource.key in (:resourceKeys)");
} else {
so.append(" where exists (select bgi.key from businessgroup bgi where bgi.resource=resource)");
so.append(" and exists (select bgi.key from businessgroup bgi where bgi.resource=resource)");
}
TypedQuery<Object[]> offersQuery = dbInstance.getCurrentEntityManager()
......
......@@ -95,7 +95,7 @@ public class BusinessGroupListFlexiTableModel extends DefaultFlexiTableDataModel
case resources:
return wrapped;
case accessControl:
return new Boolean(wrapped.isAccessControl());
return Boolean.valueOf(wrapped.isAccessControl());
case accessControlLaunch:
return wrapped.getAccessLink();
case accessTypes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment