diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 5c3b91e9f..58fa8b8c6 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -645,7 +645,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, q = self.context_record.values( 'unit', 'unit__label').distinct().order_by('label') for res in q.all(): - nbs.append((unicode(res['unit__label']), + nbs.append((unicode(res['unit__label'] or "-"), self.context_record.filter(unit=res['unit']).count())) return list(set(nbs)) @@ -659,7 +659,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, 'datings__period', 'datings__period__label').distinct().order_by( 'datings__period__order') for res in q.all(): - nbs.append((unicode(res['datings__period__label']), + nbs.append((unicode(res['datings__period__label'] or "-"), self.context_record.filter( datings__period=res['datings__period']).count())) return nbs @@ -690,7 +690,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, 'material_types__label') for res in q.all(): nbs.append( - (unicode(res['material_types__label']), + (unicode(res['material_types__label'] or "-"), Find.objects.filter( base_finds__context_record__operation=self, upstream_treatment_id__isnull=True, @@ -733,7 +733,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, 'datings__period__order') for res in q.all(): nbs.append( - (unicode(res['datings__period__label']), + (unicode(res['datings__period__label'] or "-"), Find.objects.filter( base_finds__context_record__operation=self, upstream_treatment_id__isnull=True, |