mirror of https://github.com/CIRCL/lookyloo
fix: Avoid exception is published is not set
parent
56bf9d08ba
commit
959e4e6920
|
@ -94,7 +94,10 @@ class MISP():
|
||||||
try:
|
try:
|
||||||
# NOTE: POST the event as published publishes inline, which can tak a long time.
|
# NOTE: POST the event as published publishes inline, which can tak a long time.
|
||||||
# Here, we POST as not published, and trigger the publishing in a second call.
|
# Here, we POST as not published, and trigger the publishing in a second call.
|
||||||
background_publish = event.published
|
if hasattr(event, 'published'):
|
||||||
|
background_publish = event.published
|
||||||
|
else:
|
||||||
|
background_publish = False
|
||||||
if background_publish:
|
if background_publish:
|
||||||
event.published = False
|
event.published = False
|
||||||
new_event = self.client.add_event(event, pythonify=True)
|
new_event = self.client.add_event(event, pythonify=True)
|
||||||
|
|
Loading…
Reference in New Issue