return errors
else:
if log_are_mandatory:
- return [['1', 'ECHEC AU LANCEMENT DU TRAITEMENT OU LOG INACCESSIBLE']]
+ return [['0', 'ECHEC AU LANCEMENT DU TRAITEMENT OU LOG INACCESSIBLE']]
else:
- return [['0', 'Log file not found']]
+ return [['1', 'Log file not found']]
def analyse_error_message(errors):
error_messages = []
return None
codes_insee = [a.code_insee for a in all_areas]
+ source = profile.organization
+ if not source:
+ source = "%s (Organisation inconnue)" % job_param.data_owner.username
cmd = ["sh",
settings.TALEND_MAIN_CHECK,
"--context_param",
"currentPartner="+job_param.data_owner.username,
"--context_param",
- "source_maj=CRA",
+ "source_maj="+source,
"--context_param",
'zip_name='+job_param.zip_file_name,
"--context_param",
def import_data(job_param):
""" call main Talend job
"""
+ profile = job_param.data_owner.get_profile()
+ source = profile.organization
+ if not source:
+ source = "%s (Organisation inconnue)" % job_param.data_owner.username
cmd = ["sh",
settings.TALEND_MAIN,
"--context_param",
"currentPartner="+job_param.data_owner.username,
"--context_param",
- "source_maj=CRA",
+ "source_maj="+source,
"--context_param",
"zip_name="+job_param.zip_file_name,
]