Skip to content

Commit

Permalink
Merge pull request #165 from jthiltges/pr/contactsyncerr
Browse files Browse the repository at this point in the history
contact-sync: Ignore (un)subscribers without emails
  • Loading branch information
hzhu16 authored Nov 10, 2023
2 parents 28d776f + e7a13bc commit 4a2dee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opensciencegrid/contact-sync/contact_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def main():
sys.exit("Failed to read email file: %s" % exc)

subscribed = status_api.get_subscribers(is_subscribed = True)
subscribed_email_id_list = { i['email']: i['id'] for i in subscribed }
subscribed_emails = [ i['email'] for i in subscribed ]
subscribed_email_id_list = { i['email']: i['id'] for i in subscribed if 'email' in i }
subscribed_emails = [ i['email'] for i in subscribed if 'email' in i ]
unsubscribed = status_api.get_subscribers(is_subscribed = False)
unsubscribed_emails = [ i['email'] for i in unsubscribed ]
unsubscribed_emails = [ i['email'] for i in unsubscribed if 'email' in i ]
contact_emails = get_contact_emails(args)

syslog.openlog("contact_sync")
Expand Down

0 comments on commit 4a2dee9

Please sign in to comment.