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
Post a Comment