changeset 8760:9ead754dd0a4

model/user: 'body' parameter to NotificationModel().create() is unused so remove it The email template for new user registration mails does not use the 'body' parameter, so don't pass anything.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Sat, 07 Nov 2020 21:49:39 +0100
parents 0b1a23b88f9a
children 7b7afdbe57af
files kallithea/model/user.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/user.py	Sat Nov 07 20:59:03 2020 +0100
+++ b/kallithea/model/user.py	Sat Nov 07 21:49:39 2020 +0100
@@ -170,13 +170,6 @@
         new_user = self.create(form_data)
 
         # notification to admins
-        body = (
-            'New user registration\n'
-            '---------------------\n'
-            '- Username: {user.username}\n'
-            '- Full Name: {user.full_name}\n'
-            '- Email: {user.email}\n'
-            ).format(user=new_user)
         edit_url = webutils.canonical_url('edit_user', id=new_user.user_id)
         email_kwargs = {
             'registered_user_url': edit_url,
@@ -184,7 +177,7 @@
             'new_email': new_user.email,
             'new_full_name': new_user.full_name}
         notification.NotificationModel().create(created_by=new_user,
-                                   body=body, recipients=None,
+                                   body=None, recipients=None,
                                    type_=notification.NotificationModel.TYPE_REGISTRATION,
                                    email_kwargs=email_kwargs)