From e584b93f3da28f1f4df2017ead404855a8b22c92 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 28 Oct 2017 18:47:27 +0200 Subject: Towns: fix custom manager --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c5d0750b9..703d4ccf7 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2657,7 +2657,7 @@ if settings.COUNTRY == 'fr': (self.name, unicode(self.arrondissement))) -class TownManager(models.Manager): +class TownManager(models.GeoManager): def get_by_natural_key(self, numero_insee, year): return self.get(numero_insee=numero_insee, year=year) @@ -2681,7 +2681,7 @@ class Town(Imported, models.Model): related_name='parents') cached_label = models.CharField(_(u"Cached name"), max_length=500, null=True, blank=True, db_index=True) - objects = models.GeoManager() + objects = TownManager() class Meta: verbose_name = _(u"Town") -- cgit v1.2.3