From 681a21282b66d9bde3bc49f56de825f6de2687dc Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 19 Aug 2016 12:48:56 +0200 Subject: Context records: fix parcel attribution whith public domain (refs #2284) --- archaeological_context_records/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archaeological_context_records/forms.py') diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 0bdc04fb4..8e865fa5d 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -159,8 +159,8 @@ class RecordFormGeneral(forms.Form): parcels = sorted(parcels, key=sort) for key, gparcels in groupby(parcels, sort): self.fields['parcel'].choices.append( - (" - ".join(key), [(parcel.pk, parcel.short_label) - for parcel in gparcels]) + (" - ".join([k for k in key if k]), + [(parcel.pk, parcel.short_label) for parcel in gparcels]) ) self.fields['unit'].choices = models.Unit.get_types() self.fields['unit'].help_text = models.Unit.get_help() -- cgit v1.2.3