Skip to content

Commit 544b19a

Browse files
authored
Merge pull request #78 from wesokes/hotfix/from-2.0.0
atomic
2 parents a5a49d8 + e85dc61 commit 544b19a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

entity_emailer/interface.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import traceback
33

44
from datetime import datetime
5-
5+
from django.db import transaction
66
from django.core import mail
77
from entity_event import context_loader
88

@@ -122,6 +122,7 @@ def convert_events_to_emails():
122122
Email.objects.create_email(event=event, from_address=from_address, recipients=targets)
123123

124124
@staticmethod
125+
@transaction.atomic
125126
def bulk_convert_events_to_emails():
126127
"""
127128
Converts unseen events to emails and marks them as seen. Uses the create_emails method to bulk create

entity_emailer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.0.1'
1+
__version__ = '2.0.0.2'

release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Release Notes
22
=============
33

4+
v2.0.0.2
5+
------
6+
* Atomic decorator on event fetching
7+
48
v2.0.0.1
59
------
610
* Fix unique constraint when bulk creating emails

0 commit comments

Comments
 (0)