diff --git a/hub/models.py b/hub/models.py index a64b95cbd..6a6898d39 100644 --- a/hub/models.py +++ b/hub/models.py @@ -887,7 +887,11 @@ def get_by_gss(cls, gss, area_type="WMC"): @classmethod def get_by_name(cls, name, area_type="WMC"): - return cls.objects.filter(name__iexact=name, area_type__code=area_type).order_by("-mapit_generation_high").first() + return ( + cls.objects.filter(name__iexact=name, area_type__code=area_type) + .order_by("-mapit_generation_high") + .first() + ) def fit_bounds(self): """