Commit eb199dd3 authored by Maxym Borodenko's avatar Maxym Borodenko

Merge branch 'search-not-published-descriptors' into 'master'

FIX: enable search not only published descriptors

See merge request genesys-pgr/genesys-server!186
parents b95b87d3 74659aa3
......@@ -112,7 +112,7 @@ public class DescriptorServiceImpl implements DescriptorService {
*/
@Override
public Descriptor searchMatchingDescriptor(final Descriptor input) {
final Predicate predicate = descriptor.state.in(PublishState.PUBLISHED).and(descriptor.category.in(input.getCategory())).and(descriptor.dataType.in(input.getDataType()))
final Predicate predicate = descriptor.category.in(input.getCategory()).and(descriptor.dataType.in(input.getDataType())).and(descriptor.crop.eq(input.getCrop()))
.and(descriptor.versionTag.eq(input.getVersionTag())).and(descriptor.title.eq(input.getTitle())).and(descriptor.key.eq(input.isKey()));
return lazyLoad(descriptorRepository.findOne(predicate));
}
......
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