diff --git a/entity_emailer/interface.py b/entity_emailer/interface.py index b0a071e..4408e1b 100644 --- a/entity_emailer/interface.py +++ b/entity_emailer/interface.py @@ -2,7 +2,7 @@ import traceback from datetime import datetime - +from django.db import transaction from django.core import mail from entity_event import context_loader @@ -122,6 +122,7 @@ def convert_events_to_emails(): Email.objects.create_email(event=event, from_address=from_address, recipients=targets) @staticmethod + @transaction.atomic def bulk_convert_events_to_emails(): """ Converts unseen events to emails and marks them as seen. Uses the create_emails method to bulk create diff --git a/entity_emailer/version.py b/entity_emailer/version.py index cdfc74d..990636f 100644 --- a/entity_emailer/version.py +++ b/entity_emailer/version.py @@ -1 +1 @@ -__version__ = '2.0.0.1' +__version__ = '2.0.0.2' diff --git a/release_notes.rst b/release_notes.rst index 7937202..5493bfa 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -1,6 +1,10 @@ Release Notes ============= +v2.0.0.2 +------ +* Atomic decorator on event fetching + v2.0.0.1 ------ * Fix unique constraint when bulk creating emails