mozilla/zamboni — comment on commit 470d6d85a3409de912c64338541391e01f8335fa
File: apps/search/views.py line 581
By kumar303:

this is fine for a hotfix but as a permanent fix let's adjust it at the source so other code using split_choices works as expected

def split_choices(choices, split):
"""Split a list of [(key, title)] pairs after key == split."""
index = [idx for idx, (key, title) in enumerate(choices)
if key == split]
if index:
index = index[0] + 1
return list(choices[:index]), list(choices[index:])
else:
return list(choices), []