Merged in [8924] from rjsparks@nostrum.com:

Restrict the gathering of ads for past meetings to groups that are areas.
 - Legacy-Id: 8978
Note: SVN reference [8924] has been migrated to Git commit 82bc8f06e1
This commit is contained in:
Henrik Levkowetz 2015-02-04 22:27:26 +00:00
commit cfb332c28a

View file

@ -31,13 +31,13 @@ def find_ads_for_meeting(meeting):
if history and history != g:
#print " history[%u]: %s" % (num, history)
if history.state_id == "active":
for x in history.rolehistory_set.filter(name="ad").select_related('group', 'person', 'email'):
for x in history.rolehistory_set.filter(name="ad",group__type='area').select_related('group', 'person', 'email'):
#print "xh[%u]: %s" % (num, x)
ads.append(x)
else:
#print " group[%u]: %s" % (num, g)
if g.state_id == "active":
for x in g.role_set.filter(name="ad").select_related('group', 'person', 'email'):
for x in g.role_set.filter(name="ad",group__type='area').select_related('group', 'person', 'email'):
#print "xg[%u]: %s (#%u)" % (num, x, x.pk)
ads.append(x)
return ads