Repository: plone.app.upgrade
Branch: refs/heads/master
Date: 2014-12-22T13:48:26+01:00
Author: Timo Stollenwerk (tisto) <tisto@plone.org>
Commit: https://github.com/plone/plone.app.upgrade/commit/0c8c87515985628fa33d16a188854ed6ee3520aa

email_form_name and email_from_address are stored directly on the portal.

Files changed:
M plone/app/upgrade/v50/betas.py

diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py
index c8dd907..2d44444 100644
--- a/plone/app/upgrade/v50/betas.py
+++ b/plone/app/upgrade/v50/betas.py
@@ -26,7 +26,6 @@ def upgrade_mail_controlpanel_settings(context):
     except KeyError:
         return
     portal = getSite()
-    portal_properties = getToolByName(context, "portal_properties")
 
     smtp_host = getattr(portal.MailHost, 'smtp_host', '')
     mail_settings.smtp_host = unicode(smtp_host)
@@ -40,10 +39,10 @@ def upgrade_mail_controlpanel_settings(context):
     smtp_pass = portal.MailHost.get('smtp_pass')
     mail_settings.smtp_pass = smtp_pass
 
-    email_from_address = portal_properties.get('email_from_address')
+    email_from_address = portal.get('email_from_address')
     mail_settings.email_from_address = email_from_address
 
-    email_from_name = portal_properties.get('email_from_name')
+    email_from_name = portal.get('email_from_name')
     mail_settings.email_from_name = email_from_name