diff options
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index fd2559626..d50c9e43c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -612,13 +612,13 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,      def get_town_label(self):          lbl = unicode(_('Intercommunal'))          if self.towns.count() == 1: -            lbl = self.towns.all()[0].name +            lbl = self.towns.values('name').all()[0]['name']          return lbl      def get_department(self):          if not self.towns.count():              return '00' -        return self.towns.all()[0].numero_insee[:2] +        return self.towns.values('numero_insee').all()[0]['numero_insee'][:2]      def grouped_parcels(self):          return Parcel.grouped_parcels(list(self.parcels.all())) | 
