Fix #15 (TypeError in edit_permissions under Django 1.3)