Make sure label is always defined even if not used.
This commit is contained in:
@@ -237,11 +237,11 @@ class UploadInteractiveView(UploadBaseView):
|
|||||||
file=uploaded_file.file
|
file=uploaded_file.file
|
||||||
)
|
)
|
||||||
|
|
||||||
|
label = None
|
||||||
|
|
||||||
if 'document_type_available_filenames' in forms['document_form'].cleaned_data:
|
if 'document_type_available_filenames' in forms['document_form'].cleaned_data:
|
||||||
if forms['document_form'].cleaned_data['document_type_available_filenames']:
|
if forms['document_form'].cleaned_data['document_type_available_filenames']:
|
||||||
label = forms['document_form'].cleaned_data['document_type_available_filenames'].filename
|
label = forms['document_form'].cleaned_data['document_type_available_filenames'].filename
|
||||||
else:
|
|
||||||
label = None
|
|
||||||
|
|
||||||
if not self.request.user.is_anonymous():
|
if not self.request.user.is_anonymous():
|
||||||
user_id = self.request.user.pk
|
user_id = self.request.user.pk
|
||||||
|
|||||||
Reference in New Issue
Block a user