mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
empty lists are invalid comparators (#5160)
This commit is contained in:
@@ -112,6 +112,26 @@ describe('AdhocFilter', () => {
|
||||
});
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
expect(adhocFilter3.isValid()).to.be.false;
|
||||
|
||||
const adhocFilter4 = new AdhocFilter({
|
||||
expressionType: EXPRESSION_TYPES.SIMPLE,
|
||||
subject: 'value',
|
||||
operator: 'in',
|
||||
comparator: [],
|
||||
clause: CLAUSES.WHERE,
|
||||
});
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
expect(adhocFilter4.isValid()).to.be.false;
|
||||
|
||||
const adhocFilter5 = new AdhocFilter({
|
||||
expressionType: EXPRESSION_TYPES.SIMPLE,
|
||||
subject: 'value',
|
||||
operator: 'in',
|
||||
comparator: ['val1'],
|
||||
clause: CLAUSES.WHERE,
|
||||
});
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
expect(adhocFilter5.isValid()).to.be.true;
|
||||
});
|
||||
|
||||
it('can translate from simple expressions to sql expressions', () => {
|
||||
|
||||
Reference in New Issue
Block a user