Commit 2476d560 authored by Matija Obreza's avatar Matija Obreza

Merge branch...

Merge branch 'ui-521-request-failed-with-status-code-500-when-user-try-to-apply-not-specified-crops-on-the-datasets-overview-page' into 'master'

Fixed generating of `NULL` filter predicate

Closes genesys-ui#521

See merge request genesys-pgr/application-blocks!54
parents 3b9b04ad 2819f03a
...@@ -178,7 +178,7 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten ...@@ -178,7 +178,7 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten
} }
clazzToCheck = field.getType(); clazzToCheck = field.getType();
} }
return pathBuilder; return pathBuilder.getSimple(nullProp, clazzToCheck);
} else { } else {
final Field prop = clazz.getField(nullProp); final Field prop = clazz.getField(nullProp);
if (SimpleExpression.class.isAssignableFrom(prop.getType())) { if (SimpleExpression.class.isAssignableFrom(prop.getType())) {
...@@ -199,9 +199,9 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten ...@@ -199,9 +199,9 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten
Field result = field.getType().getField(nullProp); Field result = field.getType().getField(nullProp);
PathBuilder<?> pathBuilder = new PathBuilder<>(instance.getType(), instance.getMetadata()); PathBuilder<?> pathBuilder = new PathBuilder<>(instance.getType(), instance.getMetadata());
if (CollectionPathBase.class.isAssignableFrom(result.getType())) { if (CollectionPathBase.class.isAssignableFrom(result.getType())) {
return pathBuilder.get(field.getName()).getSet(nullProp, result.getDeclaringClass()); return pathBuilder.getSet(nullProp, result.getDeclaringClass());
} }
return pathBuilder.get(field.getName()).getSimple(nullProp, result.getDeclaringClass()); return pathBuilder.getSimple(nullProp, result.getDeclaringClass());
} catch (NoSuchFieldException e1) { } catch (NoSuchFieldException e1) {
} }
......
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