diff --git a/src/rer/newsletter/adapter/sender.py b/src/rer/newsletter/adapter/sender.py index e42c6287..65f56e85 100644 --- a/src/rer/newsletter/adapter/sender.py +++ b/src/rer/newsletter/adapter/sender.py @@ -74,14 +74,10 @@ def _getDate(self): def _getMessage(self, message, footer): logger.debug("getMessage %s %s", self.context.title, message.title) content = IShippable(message).message_content - message_template = self.context.restrictedTraverse( - "@@messagepreview_view" - ) + message_template = self.context.restrictedTraverse("@@messagepreview_view") parameters = { "css": self.context.css_style, - "message_header": self.context.header - if self.context.header - else "", + "message_header": self.context.header if self.context.header else "", "message_subheader": f""" @@ -90,9 +86,7 @@ def _getMessage(self, message, footer): """, - "message_footer": self.context.footer - if self.context.footer - else "", + "message_footer": self.context.footer if self.context.footer else "", "message_content": f""" @@ -142,9 +136,7 @@ def set_end_send_infos(self, send_uid, completed=True): send_info = [x for x in details if x["uid"] == send_uid] if not send_info: return SEND_UID_NOT_FOUND - send_info[0]["send_date_end"] = datetime.today().strftime( - "%d/%m/%Y %H:%M:%S" - ) + send_info[0]["send_date_end"] = datetime.today().strftime("%d/%m/%Y %H:%M:%S") send_info[0]["completed"] = completed send_info[0]["running"] = False return OK @@ -169,9 +161,7 @@ def sendMessage(self, message): subscribers = self.get_annotations_for_channel(key=SUBSCRIBERS_KEY) nl_subject = ( - " - " + self.context.subject_email - if self.context.subject_email - else "" + " - " + self.context.subject_email if self.context.subject_email else "" ) sender = ( self.context.sender_name @@ -217,9 +207,7 @@ def doSend(self, body, subject, subscribers, sender): def addToHistory(self, message): """Add to history that message is sent""" - list_history = [ - x for x in message.workflow_history.get("message_workflow") - ] + list_history = [x for x in message.workflow_history.get("message_workflow")] current = api.user.get_current() entry = dict( action="Invio", diff --git a/src/rer/newsletter/adapter/subscriptions.py b/src/rer/newsletter/adapter/subscriptions.py index fea02932..e0e703e8 100644 --- a/src/rer/newsletter/adapter/subscriptions.py +++ b/src/rer/newsletter/adapter/subscriptions.py @@ -68,9 +68,7 @@ def channel_subscriptions(self): @property def active_subscriptions(self): - return len( - [x for x in self.channel_subscriptions.values() if x["is_active"]] - ) + return len([x for x in self.channel_subscriptions.values() if x["is_active"]]) def subscribe(self, mail): subscriptions = self.channel_subscriptions @@ -93,9 +91,7 @@ def subscribe(self, mail): "email": mail, "is_active": False, "token": uuid_activation, - "creation_date": datetime.today().strftime( - "%d/%m/%Y %H:%M:%S" - ), + "creation_date": datetime.today().strftime("%d/%m/%Y %H:%M:%S"), } transaction.commit() @@ -187,9 +183,7 @@ def addUser(self, mail): "email": mail, "is_active": True, "token": six.text_type(uuid.uuid4()), - "creation_date": datetime.today().strftime( - "%d/%m/%Y %H:%M:%S" - ), + "creation_date": datetime.today().strftime("%d/%m/%Y %H:%M:%S"), } transaction.commit() @@ -242,9 +236,7 @@ def importUsersList(self, usersList): "email": user, "is_active": True, "token": six.text_type(uuid.uuid4()), - "creation_date": datetime.today().strftime( - "%d/%m/%Y %H:%M:%S" - ), + "creation_date": datetime.today().strftime("%d/%m/%Y %H:%M:%S"), } else: logger.info("INVALID_EMAIL: %s", user) diff --git a/src/rer/newsletter/browser/channel/add.py b/src/rer/newsletter/browser/channel/add.py index bb3bb73f..338b4e64 100644 --- a/src/rer/newsletter/browser/channel/add.py +++ b/src/rer/newsletter/browser/channel/add.py @@ -43,9 +43,7 @@ def handleAdd(self, action): ) ) status = "Problems...{status}".format(status=status) - api.portal.show_message( - message=status, request=self.request, type="error" - ) + api.portal.show_message(message=status, request=self.request, type="error") class AddView(add.DefaultAddView): diff --git a/src/rer/newsletter/browser/channel/channelhistory.py b/src/rer/newsletter/browser/channel/channelhistory.py index 3886dd46..d2edd32e 100644 --- a/src/rer/newsletter/browser/channel/channelhistory.py +++ b/src/rer/newsletter/browser/channel/channelhistory.py @@ -27,9 +27,7 @@ def deleteMessageFromHistory(self): message_history = self.request.get("message_history") # recupero tutti i messaggi del canale - messages = api.content.find( - context=self.context, portal_type="Message" - ) + messages = api.content.find(context=self.context, portal_type="Message") for message in messages: annotations = IAnnotations(self.context) if KEY in list(annotations.keys()): diff --git a/src/rer/newsletter/browser/channel/channelview.py b/src/rer/newsletter/browser/channel/channelview.py index cc17f4fc..ccec1b27 100644 --- a/src/rer/newsletter/browser/channel/channelview.py +++ b/src/rer/newsletter/browser/channel/channelview.py @@ -14,9 +14,7 @@ def getState(self, message): def getMessageList(self): if self.context.portal_type == "Channel": - brainsList = api.content.find( - context=self.context, portal_type="Message" - ) + brainsList = api.content.find(context=self.context, portal_type="Message") messageList = [] for brain in brainsList: diff --git a/src/rer/newsletter/browser/channel/deleteexpiredusers.py b/src/rer/newsletter/browser/channel/deleteexpiredusers.py index e5262178..46049a89 100644 --- a/src/rer/newsletter/browser/channel/deleteexpiredusers.py +++ b/src/rer/newsletter/browser/channel/deleteexpiredusers.py @@ -27,9 +27,7 @@ def update_annotations(self, brain): None, ) - adapter = getMultiAdapter( - (channel, self.request), IChannelSubscriptions - ) + adapter = getMultiAdapter((channel, self.request), IChannelSubscriptions) keys = [x for x in adapter.channel_subscriptions.keys()] for key in keys: subscription = adapter.channel_subscriptions[key] @@ -49,14 +47,10 @@ def __call__(self): logger.info("START:Remove expired user from channels") pc = getToolByName(self.context, "portal_catalog") # noqa - channels_brain = pc.unrestrictedSearchResults( - {"portal_type": "Channel"} - ) + channels_brain = pc.unrestrictedSearchResults({"portal_type": "Channel"}) list(map(lambda x: self.update_annotations(x), channels_brain)) logger.info( - "DONE:Remove {0} expired user from channels".format( - self.user_removed - ) + "DONE:Remove {0} expired user from channels".format(self.user_removed) ) return True diff --git a/src/rer/newsletter/browser/channel/manageusers.py b/src/rer/newsletter/browser/channel/manageusers.py index d49c4587..000c5b6d 100644 --- a/src/rer/newsletter/browser/channel/manageusers.py +++ b/src/rer/newsletter/browser/channel/manageusers.py @@ -37,9 +37,7 @@ def deleteUser(self): email = self.request["email"] - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) status = channel.deleteUser(email) response = {} @@ -59,9 +57,7 @@ def exportUsersListAsFile(self): status = UNHANDLED channel = self.context.id_channel - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) userList, status = channel.exportUsersList() if status == OK: @@ -97,9 +93,7 @@ def exportUsersListAsJson(self): status = UNHANDLED channel = self.context.id_channel - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) userList, status = channel.exportUsersList() if status == OK: diff --git a/src/rer/newsletter/browser/channel/subscribe.py b/src/rer/newsletter/browser/channel/subscribe.py index eb48086e..095e32b6 100644 --- a/src/rer/newsletter/browser/channel/subscribe.py +++ b/src/rer/newsletter/browser/channel/subscribe.py @@ -86,9 +86,7 @@ def handleSave(self, action): url += "&_authenticator=" + token url += "&action=subscribe" - mail_template = self.context.restrictedTraverse( - "@@activeuser_template" - ) + mail_template = self.context.restrictedTraverse("@@activeuser_template") parameters = { "title": self.context.title, @@ -102,9 +100,7 @@ def handleSave(self, action): mail_text = mail_template(**parameters) portal = api.portal.get() - mail_text = portal.portal_transforms.convertTo( - "text/mail", mail_text - ) + mail_text = portal.portal_transforms.convertTo("text/mail", mail_text) sender = compose_sender(channel=self.context) channel_title = self.context.title diff --git a/src/rer/newsletter/browser/channel/unsubscribe.py b/src/rer/newsletter/browser/channel/unsubscribe.py index 76bac08b..283f7a6f 100644 --- a/src/rer/newsletter/browser/channel/unsubscribe.py +++ b/src/rer/newsletter/browser/channel/unsubscribe.py @@ -61,9 +61,7 @@ def handleSave(self, action): email = data.get("email", None) - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) status, secret = channel.unsubscribe(email) @@ -79,9 +77,7 @@ def handleSave(self, action): "unsubscribe_generic", default="Unable to perform unsubscription. Please contact site administrators.", # noqa ) - api.portal.show_message( - message=msg, request=self.request, type="error" - ) + api.portal.show_message(message=msg, request=self.request, type="error") return # creo il token CSRF @@ -93,9 +89,7 @@ def handleSave(self, action): url += "&_authenticator=" + token url += "&action=unsubscribe" - mail_template = self.context.restrictedTraverse( - "@@deleteuser_template" - ) + mail_template = self.context.restrictedTraverse("@@deleteuser_template") parameters = { "header": self.context.header, diff --git a/src/rer/newsletter/browser/channel/users/add.py b/src/rer/newsletter/browser/channel/users/add.py index 141f0b7e..fa05885b 100644 --- a/src/rer/newsletter/browser/channel/users/add.py +++ b/src/rer/newsletter/browser/channel/users/add.py @@ -41,16 +41,12 @@ def handleSave(self, action): channel = self.context.id_channel mail = data["email"] - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) status = channel.addUser(mail) if status == SUBSCRIBED: status = _("generic_add_message_success", default="User Added.") - api.portal.show_message( - message=status, request=self.request, type="info" - ) + api.portal.show_message(message=status, request=self.request, type="info") else: logger.exception("unhandled error add user") api.portal.show_message( diff --git a/src/rer/newsletter/browser/channel/users/confirm_subscription.py b/src/rer/newsletter/browser/channel/users/confirm_subscription.py index 5831555d..7deeaf6f 100644 --- a/src/rer/newsletter/browser/channel/users/confirm_subscription.py +++ b/src/rer/newsletter/browser/channel/users/confirm_subscription.py @@ -22,9 +22,7 @@ def render(self): return self.index() def _sendGenericMessage(self, template, receiver, message, message_title): - mail_template = self.context.restrictedTraverse( - "@@{0}".format(template) - ) + mail_template = self.context.restrictedTraverse("@@{0}".format(template)) parameters = { "header": self.context.header, @@ -59,9 +57,7 @@ def __call__(self): action = self.request.get("action") response = None - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) if action == "subscribe": response, user = channel.activateUser(secret=secret) @@ -92,9 +88,7 @@ def __call__(self): ) if response == OK: - api.portal.show_message( - message=status, request=self.request, type="info" - ) + api.portal.show_message(message=status, request=self.request, type="info") else: logger.error( 'Unable to unsubscribe user with token "{token}" on channel {channel}.'.format( # noqa diff --git a/src/rer/newsletter/browser/channel/users/usersimport.py b/src/rer/newsletter/browser/channel/users/usersimport.py index 65dfbbf7..e436482c 100644 --- a/src/rer/newsletter/browser/channel/users/usersimport.py +++ b/src/rer/newsletter/browser/channel/users/usersimport.py @@ -43,9 +43,7 @@ class IUsersImport(Interface): # se questo e ceccato allora i dati non vengono inseriti emptyList = schema.Bool( title=_("title_empty_list", default="Empties users list"), - description=_( - "description_empty_list", default="Empties channel users list" - ), + description=_("description_empty_list", default="Empties channel users list"), required=False, ) @@ -74,9 +72,7 @@ class IUsersImport(Interface): separator = schema.TextLine( title=_("title_separator", default="CSV separator"), - description=_( - "description_separator", default=_("Separator of CSV file") - ), + description=_("description_separator", default=_("Separator of CSV file")), default=",", required=True, constraint=check_separator, @@ -151,9 +147,7 @@ def handleSave(self, action): self.status = self.formErrorsMessage return - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) # devo svuotare la lista di utenti del channel if data["emptyList"]: @@ -162,9 +156,7 @@ def handleSave(self, action): csv_file = data["userListFile"].data # esporto la lista di utenti dal file try: - usersList = self.processCSV( - csv_file, data["headerLine"], data["separator"] - ) + usersList = self.processCSV(csv_file, data["headerLine"], data["separator"]) except IndexError: api.portal.show_message( message=_( @@ -194,6 +186,4 @@ def handleSave(self, action): "generic_subscribe_message_success", default="User Subscribed", ) - api.portal.show_message( - message=status, request=self.request, type="info" - ) + api.portal.show_message(message=status, request=self.request, type="info") diff --git a/src/rer/newsletter/browser/message/sendingtest.py b/src/rer/newsletter/browser/message/sendingtest.py index 31bc572f..5ca84319 100644 --- a/src/rer/newsletter/browser/message/sendingtest.py +++ b/src/rer/newsletter/browser/message/sendingtest.py @@ -48,9 +48,7 @@ def _getDate(self): def _getMessage(self, channel, message, footer): content = IShippable(message).message_content - message_template = self.context.restrictedTraverse( - "@@messagepreview_view" - ) + message_template = self.context.restrictedTraverse("@@messagepreview_view") parameters = { "css": channel.css_style, "message_header": channel.header if channel.header else "", @@ -114,15 +112,11 @@ def handleSave(self, action): "enabled": ns_obj.standard_unsubscribe, } unsubscribe_footer_text = unsubscribe_footer_template(**parameters) - body = self._getMessage( - ns_obj, message_obj, unsubscribe_footer_text - ) + body = self._getMessage(ns_obj, message_obj, unsubscribe_footer_text) sender = compose_sender(channel=ns_obj) - nl_subject = ( - " - " + ns_obj.subject_email if ns_obj.subject_email else "" - ) + nl_subject = " - " + ns_obj.subject_email if ns_obj.subject_email else "" subject = "Messaggio di prova - " + message_obj.title + nl_subject # per mandare la mail non passo per l'utility diff --git a/src/rer/newsletter/browser/message/sendmessageview.py b/src/rer/newsletter/browser/message/sendmessageview.py index c6035b7a..de57fba7 100644 --- a/src/rer/newsletter/browser/message/sendmessageview.py +++ b/src/rer/newsletter/browser/message/sendmessageview.py @@ -57,9 +57,7 @@ def channel(self): @property @memoize def active_subscriptions(self): - channel = getMultiAdapter( - (self.channel, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.channel, self.request), IChannelSubscriptions) return channel.active_subscriptions @button.buttonAndHandler(_("send_sendingview", default="Send")) @@ -78,9 +76,7 @@ def handleSave(self, action): status = self.send_syncronous() message = status == OK and self.success_message or self.error_message type = status == OK and "info" or "error" - api.portal.show_message( - message=message, request=self.request, type=type - ) + api.portal.show_message(message=message, request=self.request, type=type) self.request.response.redirect(self.context.absolute_url()) def send_syncronous(self): diff --git a/src/rer/newsletter/browser/settings.py b/src/rer/newsletter/browser/settings.py index f1c8f078..083df481 100644 --- a/src/rer/newsletter/browser/settings.py +++ b/src/rer/newsletter/browser/settings.py @@ -15,9 +15,7 @@ class ISettingsSchema(Interface): source_link = schema.TextLine( title=_("source_link", default="Link sorgente"), - description=_( - "description_source_link", default="Indirizzo da sostituire" - ), + description=_("description_source_link", default="Indirizzo da sostituire"), default="", required=False, ) diff --git a/src/rer/newsletter/contentrules/interfaces.py b/src/rer/newsletter/contentrules/interfaces.py index e882c4c0..33d7de98 100644 --- a/src/rer/newsletter/contentrules/interfaces.py +++ b/src/rer/newsletter/contentrules/interfaces.py @@ -22,9 +22,7 @@ class Notify(Interface): dest_addr = schema.TextLine( title=_("Receiver email"), - description=_( - "The address where you want to send the e-mail message." - ), + description=_("The address where you want to send the e-mail message."), required=True, ) diff --git a/src/rer/newsletter/portlets/subscribe.py b/src/rer/newsletter/portlets/subscribe.py index ef90e203..45e3e208 100644 --- a/src/rer/newsletter/portlets/subscribe.py +++ b/src/rer/newsletter/portlets/subscribe.py @@ -8,9 +8,7 @@ @implementer(IPortletTileSchema) class Assignment(base.Assignment): - def __init__( - self, header="", link_to_archive="", css_class="", newsletter=None - ): + def __init__(self, header="", link_to_archive="", css_class="", newsletter=None): self.header = header self.link_to_archive = link_to_archive self.css_class = css_class @@ -49,10 +47,7 @@ def is_subscribable(self): if api.content.get(UID=self.data.newsletter).is_subscribable: return True - elif ( - self.context.portal_type == "Channel" - and self.context.is_subscribable - ): + elif self.context.portal_type == "Channel" and self.context.is_subscribable: return True else: return False diff --git a/src/rer/newsletter/queue/view.py b/src/rer/newsletter/queue/view.py index 412614c5..942eeda7 100644 --- a/src/rer/newsletter/queue/view.py +++ b/src/rer/newsletter/queue/view.py @@ -43,9 +43,7 @@ def _sendNotification(self, status, channel, message): "message_title": message.title, } mail_text = message_template(**parameters) - mail_text = portal.portal_transforms.convertTo( - "text/mail", mail_text - ) + mail_text = portal.portal_transforms.convertTo("text/mail", mail_text) # response_email = None # if channel.response_email: @@ -97,9 +95,7 @@ def __call__(self): status = UNHANDLED message = self._getMessage() - channel = getMultiAdapter( - (self._getChannel(), self.request), IChannelSender - ) + channel = getMultiAdapter((self._getChannel(), self.request), IChannelSender) unsubscribe_footer_template = message.restrictedTraverse( "@@unsubscribe_channel_template" diff --git a/src/rer/newsletter/restapi/services/confirm_subscription.py b/src/rer/newsletter/restapi/services/confirm_subscription.py index d5169648..02dd8dda 100644 --- a/src/rer/newsletter/restapi/services/confirm_subscription.py +++ b/src/rer/newsletter/restapi/services/confirm_subscription.py @@ -19,9 +19,7 @@ class NewsletterConfirmSubscription(Service): def _sendGenericMessage(self, template, receiver, message, message_title): - mail_template = self.context.restrictedTraverse( - "@@{0}".format(template) - ) + mail_template = self.context.restrictedTraverse("@@{0}".format(template)) parameters = { "header": self.context.header, @@ -60,9 +58,7 @@ def reply(self): errors = [] response = None status = "error" - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) if action == "subscribe": response, user = channel.activateUser(secret=secret) diff --git a/src/rer/newsletter/restapi/services/subscribe.py b/src/rer/newsletter/restapi/services/subscribe.py index 9f9c6e29..1a5b3cea 100644 --- a/src/rer/newsletter/restapi/services/subscribe.py +++ b/src/rer/newsletter/restapi/services/subscribe.py @@ -49,9 +49,7 @@ def handleSubscribe(self, postData): url += "&_authenticator=" + token url += "&action=subscribe" - mail_template = self.context.restrictedTraverse( - "@@activeuser_template" - ) + mail_template = self.context.restrictedTraverse("@@activeuser_template") parameters = { "title": self.context.title, @@ -65,9 +63,7 @@ def handleSubscribe(self, postData): mail_text = mail_template(**parameters) portal = api.portal.get() - mail_text = portal.portal_transforms.convertTo( - "text/mail", mail_text - ) + mail_text = portal.portal_transforms.convertTo("text/mail", mail_text) sender = compose_sender(channel=self.context) channel_title = self.context.title diff --git a/src/rer/newsletter/restapi/services/unsubscribe.py b/src/rer/newsletter/restapi/services/unsubscribe.py index e5595894..eeff3497 100644 --- a/src/rer/newsletter/restapi/services/unsubscribe.py +++ b/src/rer/newsletter/restapi/services/unsubscribe.py @@ -41,9 +41,7 @@ def handleUnsubscribe(self, postData): email = data.get("email", None) - channel = getMultiAdapter( - (self.context, self.request), IChannelSubscriptions - ) + channel = getMultiAdapter((self.context, self.request), IChannelSubscriptions) status, secret = channel.unsubscribe(email) @@ -66,9 +64,7 @@ def handleUnsubscribe(self, postData): url += "&_authenticator=" + token url += "&action=unsubscribe" - mail_template = self.context.restrictedTraverse( - "@@deleteuser_template" - ) + mail_template = self.context.restrictedTraverse("@@deleteuser_template") parameters = { "header": self.context.header, diff --git a/src/rer/newsletter/tests/test_setup.py b/src/rer/newsletter/tests/test_setup.py index 7b310968..2d0488e4 100644 --- a/src/rer/newsletter/tests/test_setup.py +++ b/src/rer/newsletter/tests/test_setup.py @@ -31,14 +31,10 @@ def test_product_installed(self): """Test if rer.newsletter is installed.""" if hasattr(self.installer, "is_product_installed"): # Plone 6 - self.assertTrue( - self.installer.is_product_installed("rer.newsletter") - ) + self.assertTrue(self.installer.is_product_installed("rer.newsletter")) else: # Plone 5 - self.assertTrue( - self.installer.isProductInstalled("rer.newsletter") - ) + self.assertTrue(self.installer.isProductInstalled("rer.newsletter")) def test_browserlayer(self): """Test that IRerNewsletterLayer is registered.""" @@ -71,14 +67,10 @@ def test_product_uninstalled(self): """Test if rer.newsletter is cleanly uninstalled.""" if hasattr(self.installer, "is_product_installed"): # Plone 6 - self.assertFalse( - self.installer.is_product_installed("rer.newsletter") - ) + self.assertFalse(self.installer.is_product_installed("rer.newsletter")) else: # Plone 5 - self.assertFalse( - self.installer.isProductInstalled("rer.newsletter") - ) + self.assertFalse(self.installer.isProductInstalled("rer.newsletter")) def test_browserlayer_removed(self): """Test that IRerNewsletterLayer is removed.""" diff --git a/src/rer/newsletter/tiles/subscribe.py b/src/rer/newsletter/tiles/subscribe.py index 0bad7f57..d9d2aae1 100644 --- a/src/rer/newsletter/tiles/subscribe.py +++ b/src/rer/newsletter/tiles/subscribe.py @@ -22,15 +22,10 @@ def getNewsletterUrl(self): def is_subscribable(self): if self.data.get("newsletter", None): - if api.content.get( - UID=self.data.get("newsletter") - ).is_subscribable: + if api.content.get(UID=self.data.get("newsletter")).is_subscribable: return True - elif ( - self.context.portal_type == "Channel" - and self.context.is_subscribable - ): + elif self.context.portal_type == "Channel" and self.context.is_subscribable: return True else: return False diff --git a/src/rer/newsletter/transforms/link_transform.py b/src/rer/newsletter/transforms/link_transform.py index 0f89a31e..0810b557 100644 --- a/src/rer/newsletter/transforms/link_transform.py +++ b/src/rer/newsletter/transforms/link_transform.py @@ -39,9 +39,7 @@ def convert(self, orig, data, **kwargs): orig = p.transform() # come riprendo gli elementi dal control panel - source_link = api.portal.get_registry_record( - "source_link", ISettingsSchema - ) + source_link = api.portal.get_registry_record("source_link", ISettingsSchema) if not source_link: source_link = api.portal.get().absolute_url()