Skip to content

Commit

Permalink
Fix a perf issue
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault committed Jul 19, 2023
1 parent cd683c6 commit 0e22c70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion envergo/moulinette/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.db import models
from django.db.models import Case, F, Prefetch, When
from django.db.models.functions import Cast
from django.utils.functional import cached_property
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from model_utils import Choices
Expand Down Expand Up @@ -217,7 +218,7 @@ def iota_only(self):
criteria_slugs = [c.slug for c in self.criteria.all()]
return criteria_slugs == ["iota"]

@property
@cached_property
def perimeter(self):
"""Return the administrative perimeter the project is in.
Expand Down

0 comments on commit 0e22c70

Please sign in to comment.