[Fix] Fix BART Upload (#396)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#396
This commit is contained in:
2026-05-21 03:16:02 +12:00
parent 1e43c298d2
commit 76e63fda2c
2 changed files with 7 additions and 1 deletions

View File

@ -1540,6 +1540,7 @@ class PathwayNode(Schema):
name: str = Field(None, alias="name")
proposed: List[Dict[str, str]] = Field([], alias="proposed_intermediate")
smiles: str = Field(None, alias="default_node_label.smiles")
pseudo: bool = Field(False, alias="pseudo")
@staticmethod
def resolve_atom_count(obj: Node):
@ -1967,6 +1968,11 @@ def add_pathway_edge(request, package_uuid, pathway_uuid, e: Form[CreateEdge]):
description=e.edgeReason,
)
if e.multistep and e.multistep.strip() == "true":
reaction = new_e.edge_label
reaction.multistep = True
reaction.save()
# Update depths as sideeffect of above operation
pw.update_depths()

View File

@ -141,7 +141,7 @@ def get_parameter(request, paramname):
res = request.POST.get(paramname)
if res is not None and res.strip() != "":
return res
return ValueError("Not all parameters are set!")
raise ValueError("Not all parameters are set!")
def get_parameter_or_empty_string(request, paramname):