Commit dfb75f4d authored by Maxym Borodenko's avatar Maxym Borodenko
Browse files

Merge branch '300-institutefilter-accessions' into 'master'

Resolve "InstituteFilter: accessions"

Closes #300

See merge request genesys-pgr/genesys-server!192
parents a1928cab 6e41dfc4
......@@ -42,6 +42,9 @@ public class InstituteFilter extends BasicModelFilter {
/** The name. */
public StringFilter name;
/** The accessions. */
public Boolean accessions;
/**
* Builds the query.
*
......@@ -70,6 +73,13 @@ public class InstituteFilter extends BasicModelFilter {
if (name != null) {
and.and(name.buildQuery(institute.fullName));
}
if (accessions != null) {
if (accessions) {
and.and(institute.accessionCount.gt(0));
} else {
and.and(institute.accessionCount.eq(0L));
}
}
return and;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment