Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-ide committed Jun 3, 2024
2 parents c183cea + 6821422 commit 311d2f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions webapp/config.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,18 @@ class Config(object):
("jide-7a03c1e6f4528a6f9c4b1ae3cec24b39", "[email protected]"),
],
"COS-SPU": [
("Tom_Van_Buren-d335795d246db2e3befdc5d2aade338b", "[email protected]"),
("vanburt-f16a493a7acfeb8076cbb242f0955d1e", "[email protected]"),
("cgries-0dc416e2cf674c2836a179917be98d76", "[email protected]"),
],
"LTER/AND": [
("AND-01bfc39ebeeacf27a44988cd24bfe959", "[email protected]"),
],
"LTER/CAP": [
("CAP-7fe9edc60d0e1d44273e96e4898d1c0b", "[email protected]"),
],
"LTER/FCE": [
("FCE-f0e3c733c734a74c59b05e8e85af19f4", "[email protected]"),
],
"LTER/HBR": [
("HBR-673945f5868105aaeb512e1340fbb96e", "[email protected]"),
Expand Down
7 changes: 7 additions & 0 deletions webapp/home/utils/create_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions webapp/views/method_steps/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 311d2f1

Please sign in to comment.