Skip to content

Commit

Permalink
Return True on success
Browse files Browse the repository at this point in the history
This should make checking for success clearer, rather than needing to
differentiate between two falsey values (False and None).
  • Loading branch information
bennylope committed Jul 8, 2017
1 parent 3e1f618 commit 1e3bbd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions organizations/backends/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ def send_invitation(self, user, sender=None, **kwargs):
token = self.get_token(user)
kwargs.update({'token': token})
self._send_email(user, self.invitation_subject, self.invitation_body, sender, **kwargs)
return True

def send_notification(self, user, sender=None, **kwargs):
"""
Expand All @@ -299,3 +300,4 @@ def send_notification(self, user, sender=None, **kwargs):
if not user.is_active:
return False
self._send_email(user, self.notification_subject, self.notification_body, sender, **kwargs)
return True

0 comments on commit 1e3bbd9

Please sign in to comment.