Commit cf2f79bd authored by Pierre Dittgen's avatar Pierre Dittgen

Report date integration

parent 6f13f896
......@@ -174,15 +174,18 @@ def validate(schema_code, source: ValidataSource):
source_data = extract_source_data(source)
validata_report = create_validata_report(goodtables_report, ValidatorHelper.schema(schema_code))
# handle report date
date_str = goodtables_report['date']
report_date = datetime.strptime(date_str[:date_str.find('.')], '%Y-%m-%dT%H:%M:%S')
# return jsonify(validata_report)
# Enhance goodtables_report
validata_report = create_validata_report(goodtables_report, ValidatorHelper.schema(schema_code))
# Complete report
# Display report to the user
val_info = ValidatorHelper.schema_info(schema_code)
return render_template('validation_report.html', title='Rapport de validation',
val_info=ValidatorHelper.schema_info(schema_code), report=validata_report,
validation_date=datetime.now().strftime('le %d/%m/%Y à %Hh%M'),
validation_date=report_date.strftime('le %d/%m/%Y à %Hh%M'),
source=source, source_type=source.type, source_data=source_data,
report_str=json.dumps(validata_report, sort_keys=True, indent=2),
breadcrumbs=[{'url': url_for('home'), 'title': 'Accueil'},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment