Skip to content

Commit 34128d1

Browse files
authored
Merge pull request #528 from chisholm/fix_taxii_filters
Fix transformation from Filter object to TAXII filter
2 parents 585e76e + 659e1fd commit 34128d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stix2/datastore/taxii.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ def _parse_taxii_filters(self, query):
343343
For instance - "?match[type]=indicator,sighting" can be in a
344344
filter in any of these formats:
345345
346-
Filter("type", "<any op>", "indicator,sighting")
347-
Filter("type", "<any op>", ["indicator", "sighting"])
346+
Filter("type", "=", "indicator,sighting")
347+
Filter("type", "=", ["indicator", "sighting"])
348348
349349
Args:
350350
query (list): list of filters to extract which ones are TAXII
@@ -357,7 +357,7 @@ def _parse_taxii_filters(self, query):
357357
taxii_filters = []
358358

359359
for filter_ in query:
360-
if filter_.property in TAXII_FILTERS:
360+
if filter_.property in TAXII_FILTERS and filter_.op == "=":
361361
taxii_filters.append(filter_)
362362

363363
return taxii_filters

0 commit comments

Comments
 (0)