Skip to content

Commit

Permalink
Set effective date after sending an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Gagaro committed Nov 8, 2017
1 parent f117ffa commit 46f3e81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -11,6 +11,9 @@ Changelog
- Show newsletter toolbar for reviewers.
[agitator]

- Set effective date after sending an issue.
[Gagaro]


3.0.4 (2017-09-25)
------------------
Expand Down
3 changes: 3 additions & 0 deletions Products/EasyNewsletter/content/ENLIssue.py
Expand Up @@ -2,6 +2,7 @@
# from plone.protect.auto import safeWrite
from AccessControl import ClassSecurityInfo
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from DateTime import DateTime
from email.Header import Header
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
Expand Down Expand Up @@ -574,6 +575,8 @@ def send(self, recipients=[]):
request['enlwf_guard'] = True
api.content.transition(obj=self, transition='sending_completed')
request['enlwf_guard'] = False
self.setEffectiveDate(DateTime())
self.reindexObject(idxs=['effective'])

@security.protected('Modify portal content')
def loadContent(self):
Expand Down

0 comments on commit 46f3e81

Please sign in to comment.