From 0b923a7a1ca225deec60c7e3463fcd1ecfc327df Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 24 Jul 2015 18:20:46 -0400 Subject: [PATCH] Make sure label is always defined even if not used. --- mayan/apps/sources/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mayan/apps/sources/views.py b/mayan/apps/sources/views.py index f8034037b5..a4c1d6669b 100644 --- a/mayan/apps/sources/views.py +++ b/mayan/apps/sources/views.py @@ -237,11 +237,11 @@ class UploadInteractiveView(UploadBaseView): file=uploaded_file.file ) + label = None + if 'document_type_available_filenames' in forms['document_form'].cleaned_data: if forms['document_form'].cleaned_data['document_type_available_filenames']: label = forms['document_form'].cleaned_data['document_type_available_filenames'].filename - else: - label = None if not self.request.user.is_anonymous(): user_id = self.request.user.pk