Permalink
Browse files

Check if the post_to_twitter value has been submitted in the form.

  • Loading branch information...
1 parent 559b7f5 commit 903c192657b6b714b9c8aada7c08c7e6dc013d45 @nikdoof nikdoof committed Jan 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 overseer/admin.py
View
@@ -29,7 +29,7 @@ class EventAdmin(admin.ModelAdmin):
def save_formset(self, request, form, formset, change):
instances = formset.save()
- if form.cleaned_data['post_to_twitter']:
+ if 'post_to_twitter' in form.cleaned_data and form.cleaned_data['post_to_twitter']:
for obj in instances:
obj.event.post_to_twitter(obj.get_message())

0 comments on commit 903c192

Please sign in to comment.