Commit 57626244 authored by MAISSIAT's avatar MAISSIAT
Browse files

Fix grib plugin

parent 939e3e7c
......@@ -469,12 +469,19 @@ def save_data_source(file_data, submitted_data):
# date_extraction
parent_de = file_data.data_source.date_extraction
parent_de.attrib['plugin'] = submitted_data['data_reader']
if submitted_data['data_reader'] != "NetCDFDataReader":
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date']
file_data.data_source.date_extraction.format = submitted_data['date_format']
if submitted_data['data_reader'] != "GribDataReader":
if submitted_data['data_reader'] != "NetCDFDataReader":
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date']
file_data.data_source.date_extraction.format = submitted_data['date_format']
else:
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date2']
file_data.data_source.date_extraction.format = submitted_data['date_format2']
else:
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date2']
file_data.data_source.date_extraction.format = submitted_data['date_format2']
if parent_de.find("regexp") is not None:
parent_de.remove(regexp)
if parent_de.find("format") is not None:
parent_de.remove(format)
pass
# selection
if file_data.data_source.find("selection") is None:
......
......@@ -1749,7 +1749,7 @@
hideNetCDFDataReaderChecker();
hideRegexpDataReaderChecker();
hideGribReaderChecker();
hideGribDataReaderChecker();
if ( number == _REGEXP_DATA_READER_
|| number == _DIRREGEXP_DATA_READER_) {
......
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