I am trying to change my many to many script field to use FilteredSelectMultiple widget. It works up to validation where it says “Select a valid choice. 12 is not one of the available choices.” and 12 is the right database id for that ResponseAction.
Form:
class ResponseConfigurationForm(ModelForm):
scripts=forms.ModelMultipleChoiceField(queryset=ResponseAction.objects.all(),widget=FilteredSelectMultiple("ResponseAction",False,attrs={'rows':'5'}))
class Meta:
model = ResponseConfiguration
Script model:
scripts = models.ManyToManyField('ResponseAction')
I can’t find the problem.
The problem was that memcached kept some tables in memory and therefor it failed.
Solution remove all tables of the app. Syncdb and restart memcached.