Skip to content

Commit

Permalink
improve PR quality
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoromike committed Feb 18, 2019
1 parent 90cc4c6 commit 0171113
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/api/endpoints/logged_activities/secretary_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ def put(self, logged_activity_id):
return response_builder(dict(message='Invalid status value.'),
400)

"""
Send a notification to Success Ops
incase a society secretary approves
logged points
"""
# Send notification to success-ops
roles = User.query.filter(User.roles.any(Role.name=="success ops")).all()
users = User.query.all()
message = f"The society secretary for {logged_activity.society.name} has approved an activity " + \
Expand All @@ -60,11 +56,7 @@ def put(self, logged_activity_id):
SlackNotification.send_notification(self, roles, users, message)


"""
Send notification to a fellow incase
their logged points are rejected by their
society secretary
"""
# Send notification to a fellow
if logged_activity.status == "rejected":
user_id = logged_activity.user_id
fellows = User.query.filter_by(uuid=user_id).all()
Expand Down

0 comments on commit 0171113

Please sign in to comment.