#366 Ensure that Event.id is always set after `Event.get_or_create_from_event()`.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker bob  into  master

Download 366.patch

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.

Commit 29de7eb5 fixes this pull-request

Pull-Request has been merged by jkaluza

Pull-Request has been merged by jkaluza

Metadata