Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BradHN1 committed Oct 26, 2023
1 parent 3d5cd27 commit 11cdbde
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/api/services/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from _main_.utils.constants import ADMIN_URL_ROOT
from _main_.settings import SLACK_SUPER_ADMINS_WEBHOOK_URL, IS_PROD, IS_CANARY
from _main_.utils.emailer.send_email import send_massenergize_rich_email
from api.utils.api_utils import get_sender_email
from api.utils.filter_functions import sort_items
from .utils import send_slack_message
from api.store.utils import get_user_or_die
Expand Down Expand Up @@ -69,7 +68,7 @@ def create_action(self, context: Context, args, user_submitted=False) -> Tuple[d
'title': action.title,
'body': action.featured_summary,
}
# from_email = get_sender_email(action.community.id)
# sent from MassEnergize to cadmins
send_massenergize_rich_email(
subject, admin_email, 'action_submitted_email.html', content_variables, None)

Expand Down
4 changes: 2 additions & 2 deletions src/api/services/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def add_super_admin(self, context, args) -> Tuple[dict, MassEnergizeAPIError]:
'admintype': 'Super',
'admintext': "Now that you are a super admin, you have access the MassEnergize admin website at %s. You have full control over the content of our sites, can publish new communities and add new admins" % (ADMIN_URL_ROOT)
}
# from_email = get_sender_email()
# sent from MassEnergize to cadmins
send_massenergize_rich_email(
subject, admin.email, 'new_admin_email.html', content_variables, None)
return serialize(admin, full=True), None
Expand Down Expand Up @@ -115,7 +115,7 @@ def message_admin(self, context, args) -> Tuple[dict, MassEnergizeAPIError]:
"subject": message.title,
"message_body": message.body,
}
# from_email = get_sender_email(message.community.id)
# sent from MassEnergize to cadmins
send_massenergize_rich_email(subject, admin_email, 'contact_admin_email.html', content_variables, None)

if IS_PROD or IS_CANARY:
Expand Down
2 changes: 1 addition & 1 deletion src/api/services/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def create_event(self, context, args, user_submitted=False) -> Tuple[dict, MassE
'title': event.name,
'body': event.description,
}
# from_email = get_sender_email(event.community.id)
# sent from MassEnergize to cadmins
send_massenergize_rich_email(
subject, admin_email, 'event_submitted_email.html', content_variables, None)

Expand Down
1 change: 0 additions & 1 deletion src/api/services/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def message_admin(self, context, args) -> Tuple[dict, MassEnergizeAPIError]:
community = team.primary_community
admin_email = community.owner_email
admin_name = community.owner_name
# from_email = get_sender_email(community.id)

subject = 'A message was sent to the Team Admin for ' + team.name + ' in ' + community.name
team_members = TeamMember.objects.filter(team=team)
Expand Down
1 change: 0 additions & 1 deletion src/api/services/testimonial.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def create_testimonial(self, context, args, user_submitted=False) -> Tuple[dict,
return None, CustomMassenergizeError('Testimonial submission incomplete')

subject = 'User Testimonial Submitted'
# from_email = get_sender_email(testimonial.community.id)

content_variables = {
'name': first_name,
Expand Down
1 change: 0 additions & 1 deletion src/api/services/vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def create_vendor(self, context, args, user_submitted=False) -> Tuple[dict, Mass
return None, CustomMassenergizeError('Vendor submission incomplete')

subject = 'User Service Provider Submitted'
# from_email = get_sender_email(community.id)

content_variables = {
'name': first_name,
Expand Down
1 change: 0 additions & 1 deletion src/api/store/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def create_team(self, context:Context, args) -> Tuple[dict, MassEnergizeAPIError
cadmins = CommunityAdminGroup.objects.filter(community__id=primary_community_id).first().members.all()
message = "A team has requested creation in your community. Visit the link below to view their information and if it is satisfactory, check the approval box and update the team.\n\n%s" % ("%s/admin/edit/%i/team" %
(ADMIN_URL_ROOT, team.id))
# from_email = get_sender_email(primary_community_id)

for cadmin in cadmins:
send_massenergize_email(subject="New team awaiting approval",msg=message, to=cadmin.email,sender=None )
Expand Down
2 changes: 1 addition & 1 deletion src/task_queue/nudges/cadmin_events_nudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def send_events_report(name, email, event_list, user_info):
data["name"] = name.split(" ")[0]
data["change_preference_link"] = change_preference_link
data["events"] = event_list
# from_email = get_sender_email(comm.id)
# sent from MassEnergize to cadmins
send_massenergize_email_with_attachments(WEEKLY_EVENTS_NUDGE_TEMPLATE, data, [email], None, None, None)
return True
except Exception as e:
Expand Down

0 comments on commit 11cdbde

Please sign in to comment.