diff --git a/webapp/config.py.template b/webapp/config.py.template index 695f53e8..800c628b 100644 --- a/webapp/config.py.template +++ b/webapp/config.py.template @@ -110,12 +110,18 @@ class Config(object): ("jide-7a03c1e6f4528a6f9c4b1ae3cec24b39", "jride@wisc.edu"), ], "COS-SPU": [ + ("Tom_Van_Buren-d335795d246db2e3befdc5d2aade338b", "Tom.VanBuren@sattle.gov"), + ("vanburt-f16a493a7acfeb8076cbb242f0955d1e", "Tom.VanBuren@sattle.gov"), ("cgries-0dc416e2cf674c2836a179917be98d76", "cgries@wisc.edu"), ], + "LTER/AND": [ + ("AND-01bfc39ebeeacf27a44988cd24bfe959", "suzanne.remillard@oregonstate.edu"), + ], "LTER/CAP": [ ("CAP-7fe9edc60d0e1d44273e96e4898d1c0b", "Stevan.Earl@asu.edu"), ], "LTER/FCE": [ + ("FCE-f0e3c733c734a74c59b05e8e85af19f4", "gkamener@fiu.edu"), ], "LTER/HBR": [ ("HBR-673945f5868105aaeb512e1340fbb96e", "mary.martin@unh.edu"), diff --git a/webapp/home/utils/create_nodes.py b/webapp/home/utils/create_nodes.py index ba0175d0..28b616a6 100644 --- a/webapp/home/utils/create_nodes.py +++ b/webapp/home/utils/create_nodes.py @@ -1105,6 +1105,12 @@ def create_method_step(method_step_node:Node=None, description:str=None, instrum description = '' # TODO: Handle cases with empty description but non-empty data_sources description = f"{description}\n{data_sources_marker_begin}\n{data_sources}\n{data_sources_marker_end}" + valid, msg = texttype_node_processing.is_valid_xml_fragment(description, names.DESCRIPTION) + if not valid: + log_error(msg) + flash(texttype_node_processing.invalid_xml_error_message(msg), 'error') + return False + texttype_node_processing.post_process_texttype_node(description_node, description) instrumentation_nodes = method_step_node.find_all_children(names.INSTRUMENTATION) @@ -1131,6 +1137,7 @@ def create_method_step(method_step_node:Node=None, description:str=None, instrum else: for instrumentation_node in instrumentation_nodes: method_step_node.remove_child(instrumentation_node) + return True def create_data_source(data_source_node:Node=None, title:str=None, online_description:str=None, online_url:str=None): diff --git a/webapp/views/method_steps/md.py b/webapp/views/method_steps/md.py index ceb35526..382cdd88 100644 --- a/webapp/views/method_steps/md.py +++ b/webapp/views/method_steps/md.py @@ -226,8 +226,9 @@ def method_step(filename=None, node_id=None): method_step_node = Node(names.METHODSTEP, parent=methods_node) add_child(methods_node, method_step_node) node_id = method_step_node.id - create_method_step(method_step_node, description, instrumentation, data_sources, - data_sources_marker_begin, data_sources_marker_end) + if not create_method_step(method_step_node, description, instrumentation, data_sources, + data_sources_marker_begin, data_sources_marker_end): + new_page = PAGE_METHOD_STEP # Stay on same page to display error message save_both_formats(filename=filename, eml_node=eml_node)