From 6eedcaed9dc7f54e95b7ae7471744aba33aae12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 23 May 2013 16:29:23 -0300 Subject: [PATCH] Ops! esqueci um detalhezinho no commit anterior :/ --- sigi/apps/diagnosticos/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sigi/apps/diagnosticos/admin.py b/sigi/apps/diagnosticos/admin.py index c22fd57..8e9e8fb 100644 --- a/sigi/apps/diagnosticos/admin.py +++ b/sigi/apps/diagnosticos/admin.py @@ -75,6 +75,10 @@ class DiagnosticoAdmin(BaseEntityAdmin): return '%s' % (obj.casa_legislativa.municipio.uf) get_uf.short_description = 'UF' get_uf.admin_order_field = 'casa_legislativa__municipio__uf__nome' + + def lookup_allowed(self, lookup, value): + return super(DiagnosticoAdmin, self).lookup_allowed(lookup, value) or \ + lookup in ['casa_legislativa__municipio__uf__codigo_ibge__exact'] class EscolhaAdmin(admin.ModelAdmin): search_fields = ('title',)