fix: [misp export] fix empty event on module start

dev
terrtia 2024-01-30 11:45:43 +01:00
parent 194ae960fc
commit 5fab2326e6
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 5 deletions

View File

@ -319,10 +319,6 @@ class MISPExporterAutoDaily(MISPExporter):
def __init__(self, url='', key='', ssl=False):
super().__init__(url=url, key=key, ssl=ssl)
# create event if don't exists
try:
self.event_id = self.get_daily_event_id()
except MISPConnectionError:
self.event_id = - 1
self.date = datetime.date.today()
@ -345,6 +341,7 @@ class MISPExporterAutoDaily(MISPExporter):
self.add_event_object(self.event_id, obj)
except MISPConnectionError:
self.event_id = - 1
return -1