Skip to content

Commit 88300e5

Browse files
committed
Removed emtpy items from the must-be-there list before handing the list to Person.objects.filter(pk__in=...). Fixes issues ietf-tools#1684, ietf-tools#1685
- Legacy-Id: 9528
1 parent e843516 commit 88300e5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/secr/sreq/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ def confirm(request, acronym):
237237
if 'resources' in form:
238238
form['resources'] = [ ResourceAssociation.objects.get(pk=pk) for pk in form['resources'].split(',')]
239239
if 'bethere' in form:
240-
form['bethere'] = Person.objects.filter(pk__in=form['bethere'].split(','))
240+
person_id_list = [ id for id in form['bethere'].split(',') if id ]
241+
form['bethere'] = Person.objects.filter(pk__in=person_id_list)
241242
meeting = get_meeting()
242243
group = get_object_or_404(Group,acronym=acronym)
243244
login = request.user.person

0 commit comments

Comments
 (0)