Skip to content

Commit

Permalink
Merge pull request #14 from DCSO/fix-seqid
Browse files Browse the repository at this point in the history
Fix seqid handling
  • Loading branch information
rhaist authored Aug 31, 2021
2 parents 8d4636b + d81b95e commit a730340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/tie2index.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def fetch_iocs() -> NoReturn:
logger.info("fetching IoCs using sequence number {}".format(fetcher.state['seq_number']))

i = 0
data = fetcher.fetch(updated_since=updated_since, limit=10)
data = fetcher.fetch(sequence=fetcher.state['seq_number'], updated_since=updated_since, limit=10)
try:
while i < 50:
i += 1
Expand Down
2 changes: 1 addition & 1 deletion lib/dcsotie/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _fetch(self, uri: str, params: Optional[Dict] = None) -> Any:

# store highest sequence
if len(data['iocs']) > 0:
self.state['seq_number'] = sorted([ioc['min_seq'] for ioc in data['iocs']])[-1]
self.state['seq_number'] = sorted([ioc['max_seq'] for ioc in data['iocs']])[-1]

try:
if self._raw:
Expand Down

0 comments on commit a730340

Please sign in to comment.