python - In solr search, solve the error: model 'X' has an empty model_attr 'company' and doesn't allow a default or null value -


i using solr search in django. when rebuilding index solr, following error:

model 'x' has empty model_attr 'company' , doesn't allow default or null value. 

does know mistake made, , how can solve issues.

you need add

indexes.charfield(model_attr='company', null=true) 

and if want allow blank

add blank=true

indexes.charfield(model_attr='company', blank=true, null=true) 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -