Issue #87, Per document language selection

This commit is contained in:
Roberto Rosario
2014-10-22 02:35:16 -04:00
parent 9b1b89cc21
commit e8762e4792
13 changed files with 167 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ def task_check_interval_source(source_id):
@app.task(ignore_result=True)
def task_upload_document(source_id, file_path, filename=None, use_file_name=False, document_type_id=None, expand=False, metadata_dict_list=None, user_id=None, document_id=None, new_version_data=None, command_line=False, description=None):
def task_upload_document(source_id, file_path, filename=None, use_file_name=False, document_type_id=None, expand=False, metadata_dict_list=None, user_id=None, document_id=None, new_version_data=None, command_line=False, description=None, language=None):
source = Source.objects.get_subclass(pk=source_id)
if document_type_id:
@@ -41,7 +41,7 @@ def task_upload_document(source_id, file_path, filename=None, use_file_name=Fals
with File(file=open(file_path, mode='rb')) as file_object:
#try:
result = source.upload_file(file_object, filename, use_file_name, document_type, expand, metadata_dict_list, user, document, new_version_data, command_line, description)
result = source.upload_file(file_object, filename=filename, use_file_name=use_file_name, document_type=document_type, expand=expand, metadata_dict_list=metadata_dict_list, user=user, document=document, new_version_data=new_version_data, command_line=command_line, description=description, language=language)
#except NewDocumentVersionNotAllowed:
# messages.error(request, _(u'New version uploads are not allowed for this document.'))