Skip to content

Commit 5e0a5dd

Browse files
committed
Fixing filter to map to allow signing
1 parent ebb19c6 commit 5e0a5dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packet/notifications.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def packet_signed_notification(packet, signer):
1717
subscriptions = NotificationSubscription.query.filter_by(freshman_username=packet.freshman_username)
1818
if subscriptions:
19-
tokens = list(filter(lambda subscription: subscription.token, subscriptions))
19+
tokens = list(map(lambda subscription: subscription.token, subscriptions))
2020

2121
notification = onesignal.Notification(post_body=post_body)
2222
notification.post_body["content"]["en"] = signer + ' signed your packet! Congrats or I\'m Sorry'
@@ -32,7 +32,7 @@ def packet_signed_notification(packet, signer):
3232
def packet_100_percent_notification(packet):
3333
subscriptions = NotificationSubscription.query.all()
3434
if subscriptions:
35-
tokens = list(filter(lambda subscription: subscription.token, subscriptions))
35+
tokens = list(map(lambda subscription: subscription.token, subscriptions))
3636

3737
notification = onesignal.Notification(post_body=post_body)
3838
notification.post_body["content"]["en"] = packet.freshman.name + ' got 💯 on packet!'

0 commit comments

Comments
 (0)