Skip to content

Commit

Permalink
MAINT solve issue during merging
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Feb 13, 2022
1 parent a53d4ed commit bb15e6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
22 changes: 0 additions & 22 deletions ramp-frontend/ramp_frontend/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ def approve_users():
asked_sign_up=asked_sign_up,
admin=True)
elif request.method == 'POST':
users_to_be_approved = request.form.getlist('approve_users')
event_teams_to_be_approved = request.form.getlist(
'approve_event_teams'
)
elif request.method == "POST":
send_mail_with_context = copy_current_request_context(send_mail)
users_to_be_approved = request.form.getlist("approve_users")
event_teams_to_be_approved = request.form.getlist("approve_event_teams")
Expand All @@ -80,9 +75,6 @@ def approve_users():
body = ('{}, your account has been approved. You can now '
'sign-up for any open RAMP event.'
.format(user.name))
send_mail(
to=user.email, subject=subject, body=body
)
send_mail_with_context(to=user.email, subject=subject, body=body)
elif request.form["submit_button"] == "Remove!":
delete_user(db.session, asked_user)
Expand All @@ -101,20 +93,6 @@ def approve_users():

subject = ('Signed up for the RAMP event {}'
.format(asked_event_team.event.name))
body = ('{}, you have been registered to the RAMP event {}. '
'You can now proceed to your sandbox and make '
'submissions.\nHave fun!!!'
.format(user.name, asked_event_team.event.name))
send_mail(
to=user.email, subject=subject, body=body
)
body = (
"{}, you have been registered to the RAMP event {}. "
"You can now proceed to your sandbox and make "
"submissions.\nHave fun!!!".format(
user.name, asked_event_team.event.name
)
)
send_mail_with_context(to=user.email, subject=subject, body=body)
elif request.form["submit_button"] == "Remove!":
delete_event_team(
Expand Down
4 changes: 4 additions & 0 deletions ramp-frontend/ramp_frontend/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ def user_confirm_email(token):
subject = 'Approve registration of {}'.format(
user.name
)
body = body_formatter_user(user)
url_approve = "http://{}/sign_up/{}".format(
app.config["DOMAIN_NAME"], user.name
)
body += "Click on the link to approve the registration "
body += "of this user: {}".format(url_approve)
send_mail_with_context(admin.email, subject, body)
Expand Down

0 comments on commit bb15e6d

Please sign in to comment.