Skip to content

Commit a3dabdf

Browse files
committed
threathunter/models: Report.save() -> Report.save_watchlist()
1 parent 3bfd0d9 commit a3dabdf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/threathunter/watchlist_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def create_watchlist(cb, parser, args):
141141
report_dict["iocs"] = iocs
142142

143143
report = cb.create(Report, report_dict)
144-
report.save()
144+
report.save_watchlist()
145145

146146
watchlist_dict["report_ids"].append(report.id)
147147
watchlist = cb.create(Watchlist, watchlist_dict)
@@ -230,7 +230,7 @@ def import_watchlist(cb, parser, args):
230230
[ioc_id.update(value.encode("utf-8")) for value in ioc["values"]]
231231
ioc["id"] = ioc_id.hexdigest()
232232
report = cb.create(Report, rep_dict)
233-
report.save()
233+
report.save_watchlist()
234234
report_ids.append(report.id)
235235

236236
# finally, update our new watchlist with the imported reports

src/cbapi/psc/threathunter/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def __init__(self, cb, model_unique_id=None, initial_data=None,
355355
if self.iocs_v2:
356356
self._iocs_v2 = [IOC_V2(cb, initial_data=ioc, report_id=self.id) for ioc in self.iocs_v2]
357357

358-
def save(self):
358+
def save_watchlist(self):
359359
"""Saves this report *as a watchlist report*.
360360
361361
.. NOTE::

0 commit comments

Comments
 (0)