Skip to content

Commit

Permalink
fix setting effective and expiration date
Browse files Browse the repository at this point in the history
  • Loading branch information
vangheem committed Jan 16, 2015
1 parent 7496bd1 commit a3b1750
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plone/app/content/browser/folder.py
Expand Up @@ -326,10 +326,10 @@ class TagsAction(FolderContentsActionView):
required_obj_permission = 'Modify portal content'

def __call__(self):
self.remove = set([v.encode('utf8') for v in \
json.loads(self.request.form.get('remove'))])
self.add = set([v.encode('utf8') for v in \
json.loads(self.request.form.get('add'))])
self.remove = set([v.encode('utf8') for v in
json.loads(self.request.form.get('remove'))])
self.add = set([v.encode('utf8') for v in
json.loads(self.request.form.get('add'))])
return super(TagsAction, self).__call__()

def action(self, obj):
Expand Down Expand Up @@ -414,10 +414,10 @@ def __call__(self):
return super(PropertiesAction, self).__call__()

def dx_action(self, obj):
if self.effectiveDate and hasattr(obj, 'effective'):
obj.effective = DateTime(self.effectiveDate)
if self.expirationDate and hasattr(obj, 'expires'):
obj.expires = DateTime(self.expirationDate)
if self.effectiveDate and hasattr(obj, 'effective_date'):
obj.effective_date = DateTime(self.effectiveDate)
if self.expirationDate and hasattr(obj, 'expiration_date'):
obj.expiration_date = DateTime(self.expirationDate)
if self.copyright and hasattr(obj, 'rights'):
obj.rights = self.copyright
if self.contributors and hasattr(obj, 'contributors'):
Expand Down

1 comment on commit a3b1750

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS PASSED
Mr.Roboto url : http://jenkins.plone.org/roboto/get_info?push=6417c85ce47e4f238aac96b08fa3dab3
plone-5.0-python-2.7 [SUCCESS]

Please sign in to comment.