Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxii str bug #37417

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Packs/FeedTAXII/Integrations/FeedTAXII2/FeedTAXII2.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def filter_previously_fetched_indicators(indicators: list, last_run: dict) -> li
last_run["latest_indicators"] = [{obj.get('rawJSON', {}).get("id"): obj.get('rawJSON', {}).get("modified")}
if obj.get("value") != "$$DummyIndicator$$" else obj
for obj in indicators]
demisto.debug("with first fetch, updated the latest_indicators")
return indicators
for indicator in indicators:
indicator_id = indicator.get("rawJSON", {}).get('id', "")
Expand All @@ -71,6 +72,10 @@ def filter_previously_fetched_indicators(indicators: list, last_run: dict) -> li
# if the indicator is stored in latest_indicators -> check if it was modified
if saved_indicator:
modified_date = saved_indicator[0].get(indicator_id)
if not modified_date or not indicator.get("rawJSON", {}).get("modified" ""):
demisto.debug(f"we got saved indicator with id:{indicator_id}")
demisto.debug(f"the rawjson of it is: {indicator.get('rawJSON')}")
demisto.debug(f"saved indicator is: {saved_indicator}")

# the indicator is stored in latest_indicators, but got modified -> add to new_indicators
if indicator.get("rawJSON", {}).get("modified", "") > modified_date:
Expand Down
Loading