From fbcd968f8436e13050fb7eced712d8604eec5f15 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 20 Jun 2018 20:47:49 +0200 Subject: Do not propose modification for items with non editable categories --- chimere/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chimere/models.py') diff --git a/chimere/models.py b/chimere/models.py index 1306111..1b6ff06 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -666,6 +666,11 @@ class GeographicItem(models.Model): def geometry(self): return getattr(self, self.geom_attr).wkt + @property + def is_editable(self): + return bool(self.categories.filter(available=True, + submission=True).count()) + def text_description(self): """ Convert the html description into a text description -- cgit v1.2.3