# HG changeset patch # User Thomas De Schampheleire # Date 2020-11-07 21:49:39 # Node ID 9ead754dd0a451f5031b0fc3b4975439c7b68369 # Parent 0b1a23b88f9af231e8cc9cbba53306b5b36a672f 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. diff --git a/kallithea/model/user.py b/kallithea/model/user.py --- a/kallithea/model/user.py +++ b/kallithea/model/user.py @@ -170,13 +170,6 @@ class UserModel(object): 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 @@ class UserModel(object): '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)