diff --git a/sigi/apps/convenios/admin.py b/sigi/apps/convenios/admin.py index 2f5435f..b744c13 100644 --- a/sigi/apps/convenios/admin.py +++ b/sigi/apps/convenios/admin.py @@ -77,8 +77,9 @@ class ConvenioAdmin(BaseModelAdmin): ordering = ('casa_legislativa', '-data_retorno_assinatura') raw_id_fields = ('casa_legislativa',) get_queryset = queryset_ascii - search_fields = ('id', 'search_text', 'casa_legislativa__sigla', - 'num_processo_sf', 'num_convenio') + search_fields = ('id', 'casa_legislativa__search_text', + 'casa_legislativa__sigla', 'num_processo_sf', + 'num_convenio') def get_uf(self, obj): return obj.casa_legislativa.municipio.uf.sigla diff --git a/sigi/apps/convenios/migrations/0015_remove_convenio_search_text.py b/sigi/apps/convenios/migrations/0015_remove_convenio_search_text.py new file mode 100644 index 0000000..c187381 --- /dev/null +++ b/sigi/apps/convenios/migrations/0015_remove_convenio_search_text.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('convenios', '0014_gescon'), + ] + + operations = [ + migrations.RemoveField( + model_name='convenio', + name='search_text', + ), + ] diff --git a/sigi/apps/convenios/models.py b/sigi/apps/convenios/models.py index 4982a5f..d2aea00 100644 --- a/sigi/apps/convenios/models.py +++ b/sigi/apps/convenios/models.py @@ -54,7 +54,6 @@ class Convenio(models.Model): verbose_name=_(u'órgão conveniado') ) # campo de busca em caixa baixa e sem acentos - search_text = SearchField(field_names=['casa_legislativa']) projeto = models.ForeignKey( Projeto, on_delete=models.PROTECT,