From 1e3bbd971902b854c4d4f14d49f58f5f2d31eda9 Mon Sep 17 00:00:00 2001 From: Ben Lopatin Date: Fri, 7 Jul 2017 21:55:39 -0400 Subject: [PATCH] Return True on success This should make checking for success clearer, rather than needing to differentiate between two falsey values (False and None). --- organizations/backends/defaults.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/organizations/backends/defaults.py b/organizations/backends/defaults.py index ecf815b5..f5375575 100644 --- a/organizations/backends/defaults.py +++ b/organizations/backends/defaults.py @@ -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): """ @@ -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