Merged in [8848] from rjsparks@nostrum.com:\n Don't add the group's ad to the list of people who need to be at a meeting if the group doesn't have an ad. Protects the field formatter from occurances of None in passed in lists. Patch applied to production.
- Legacy-Id: 8881
Note: SVN reference [8848] has been migrated to Git commit fd9649abf2
This commit is contained in:
commit
73c56ef26b
|
@ -16,7 +16,7 @@ def tokeninput_id_name_json(objs):
|
|||
|
||||
formatter = format_email if objs and isinstance(objs[0], Email) else format_person
|
||||
|
||||
return json.dumps([{ "id": o.pk, "name": formatter(o) } for o in objs])
|
||||
return json.dumps([{ "id": o.pk, "name": formatter(o) } for o in objs if o])
|
||||
|
||||
class AutocompletedPersonsField(forms.CharField):
|
||||
"""Tokenizing autocompleted multi-select field for choosing
|
||||
|
|
|
@ -315,7 +315,8 @@ def add_essential_people(group,initial):
|
|||
if 'bethere' in initial:
|
||||
people.update(initial['bethere'])
|
||||
people.update(Person.objects.filter(role__group=group, role__name='chair'))
|
||||
people.add(group.ad)
|
||||
if group.ad:
|
||||
people.add(group.ad)
|
||||
initial['bethere'] = list(people)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue