Methods calling get_or_create_from_event() expect the Event.id to always
exist in the returned Event, but the Event.id is only set after the db.session.commit().
Therefore in this commit, the session.commit() is called in the end
of get_or_create_from_event() to ensure the id is always set.
This fixes issues when @fail_event_on_handler_exception decorator
actually did not move the Event to failed state, because the Event.id
was None.
Methods calling
get_or_create_from_event()expect the Event.id to alwaysexist in the returned Event, but the Event.id is only set after the
db.session.commit().Therefore in this commit, the
session.commit()is called in the endof
get_or_create_from_event()to ensure theidis always set.This fixes issues when
@fail_event_on_handler_exceptiondecoratoractually did not move the Event to failed state, because the Event.id
was
None.