fixing 'model' has an empty model_attr bug for haystack