Skip to content

Commit 9cf8978

Browse files
committed
Parse filter from response element where necessary
1 parent 5b4b487 commit 9cf8978

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/gmp/collection/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function parseInfoCounts(response: InfoWithCounts) {
154154
}
155155

156156
export function parseFilter(element: FilterElement): FilterType {
157-
return Filter.fromElement(element.filters);
157+
return Filter.fromResponseElement(element.filters);
158158
}
159159

160160
export function parseCounts<TElement = Element>(

src/gmp/commands/__tests__/entities.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('EntitiesCommand tests', () => {
6363
});
6464

6565
test('should prefer filter_id over filter parameter', async () => {
66-
const filter = Filter.fromElement({
66+
const filter = Filter.fromResponseElement({
6767
_id: 'bar',
6868
keywords: {
6969
keyword: {relation: '=', value: 'bar', column: 'foo'},

src/gmp/commands/__tests__/entity.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('EntityCommand tests', () => {
112112
});
113113

114114
test('should get entity and prefer filter_id over filter parameter', async () => {
115-
const filter = Filter.fromElement({
115+
const filter = Filter.fromResponseElement({
116116
_id: 'bar',
117117
keywords: {
118118
keyword: {relation: '=', value: 'bar', column: 'foo'},

0 commit comments

Comments
 (0)