diff --git a/fowl/game/views.py b/fowl/game/views.py
index 9f42a4f..977278d 100644
--- a/fowl/game/views.py
+++ b/fowl/game/views.py
@@ -50,10 +50,13 @@ def edit_event(request, event):
'teams': [],
})
- for k,v in request.POST.iterlists():
+ for k, team in request.POST.iterlists():
if k.startswith('members'):
- _, match, team = k.split('-')
- edict['matches'][int(match)-1]['teams'].append(v)
+ _, match, _ = k.split('-')
+ # remove empty strings from team
+ team = [m for m in team if m]
+ if team:
+ edict['matches'][int(match)-1]['teams'].append(team)
event = Event.from_dict(edict)
# score the event for all active leagues
diff --git a/makedb.sh b/makedb.sh
old mode 100644
new mode 100755