Skip to content

Fix deprecations in the query filters #376

@JuanTecedor

Description

@JuanTecedor

After running tests/test_query_filters.py, some of the tests produce the following warnings in TheHive client:

$ docker logs thehive4py-integration-tester | grep -i deprecated
[...]
[warn] o.t.s.q.FilterQuery (admin@thehive.local@main-org) [2d097c9f31c5acfd] The filter '_contains' is deprecated and is replaced by '_has'
[warn] o.t.s.q.InputFilter (admin@thehive.local@main-org) [c01680390b9b907f] Use of filter {"_createdAt": "0"} is deprecated. Please use {"_field": "_createdAt", "_value": "0"}
[warn] o.t.s.q.InputFilter (admin@thehive.local@main-org) [1f35e365ccc71609] Use of filter {"_createdAt": "1736196782719"} is deprecated. Please use {"_field": "_createdAt", "_value": "1736196782719"}

This can be fixed by updating the dictionary structure of the filters in thehive4py/query/filters.py.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions