File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -651,9 +651,8 @@ def extra_headers(self):
651651 ),
652652 }
653653
654- def submit (self ):
654+ def get_subscriptions (self ) -> list [ Subscription ] :
655655 subscriptions = list (self .subscriptions .filter (subscribed = True ).all ())
656-
657656 if subscription_generator := self .newsletter .get_subscription_generator ():
658657 already_subscribed = {s .email for s in subscriptions }
659658 unsubscribed = {s .email for s in self .newsletter .subscription_set .filter (unsubscribed = True ).all ()}
@@ -669,7 +668,10 @@ def submit(self):
669668 Subscription (newsletter = self .newsletter , name = name , email = email , subscribed = True )
670669 )
671670 already_subscribed .add (email )
671+ return subscriptions
672672
673+ def submit (self ):
674+ subscriptions = self .get_subscriptions ()
673675 logger .info (
674676 gettext ("Submitting %(submission)s to %(count)d people" ),
675677 {'submission' : self , 'count' : len (subscriptions )}
You can’t perform that action at this time.
0 commit comments