From cd19678576fd28662f5685d4c52552b96a82e251 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 16 Oct 2016 23:29:41 +0200 Subject: List and export context record relations (refs #3329) --- archaeological_context_records/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_context_records/forms.py') diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index d468e3a3c..4a5267654 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -214,7 +214,7 @@ class RecordFormGeneral(ManageOldType, forms.Form): cr = models.ContextRecord.objects.filter( label=label, parcel__operation__pk=operation_id) if 'pk' in cleaned_data and cleaned_data['pk']: - cr = cr.exclude(pk=cleaned_data['pk']) + cr = cr.exclude(pk=int(cleaned_data['pk'])) if cr.count(): raise forms.ValidationError(_(u"This ID already exists for " u"this operation.")) -- cgit v1.2.3