Ignore:
Timestamp:
Mar 29, 2012, 4:19:34 AM (14 years ago)
Author:
MIT Association of Student Activities <asa@…>
Branches:
master, space-access, stable, stage
Children:
05f5712
Parents:
5680065
git-author:
Alex Dehnert <adehnert@…> (03/29/12 04:19:34)
git-committer:
MIT Association of Student Activities <asa@…> (03/29/12 04:19:34)
Message:

Don't email CAC if they don't need to do anything

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/space/diffs.py

    r5680065 ra53f8ee  
    281281
    282282    asa_rcpts = ['asa-space@mit.edu', 'asa-db@mit.edu', ]
    283     util.emails.email_from_template(
    284         tmpl='space/cac-change-email.txt',
    285         context={'changed_groups': changed_groups, 'locker_msgs':cac_locker_msgs, },
    286         subject="Space access updates",
    287         to=['caclocks@mit.edu'],
    288         cc=asa_rcpts,
    289     ).send()
     283    if changed_groups:
     284        util.emails.email_from_template(
     285            tmpl='space/cac-change-email.txt',
     286            context={'changed_groups': changed_groups, 'locker_msgs':cac_locker_msgs, },
     287            subject="Space access updates",
     288            to=['caclocks@mit.edu'],
     289            cc=asa_rcpts,
     290        ).send()
    290291    for group, cac_msg, group_office_msg, group_locker_msgs in changed_groups:
    291292        util.emails.email_from_template(
Note: See TracChangeset for help on using the changeset viewer.