Just a guess: have you actually selected a user and a folder when
submitting the form? I think only valid field are present on the
cleaned_data dict, and your users and folder fields are not optional
(blank=True, null=True).
hth,
nuno
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>
I copied your models (just removed the intermediaty "Permission"
because I don't know your User model) into a new app and I have 2
scenarios Adding an Application in the admin:
a) if I select a User and Folder, the validation runs just fine
b) if I do not select an User, then the "clean" method is still
accessed, but since 'users' is not present in the cleaned_data dict it
throws an exception - which is the scenario you give, hence my
original guess :)
Nuno
Oops, forgot to add i made the ManyToMany a relation to django's User model.
Nuno