forked from enviPath/enviPy
[Fix] Fix BART Upload (#396)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#396
This commit is contained in:
@ -1540,6 +1540,7 @@ class PathwayNode(Schema):
|
|||||||
name: str = Field(None, alias="name")
|
name: str = Field(None, alias="name")
|
||||||
proposed: List[Dict[str, str]] = Field([], alias="proposed_intermediate")
|
proposed: List[Dict[str, str]] = Field([], alias="proposed_intermediate")
|
||||||
smiles: str = Field(None, alias="default_node_label.smiles")
|
smiles: str = Field(None, alias="default_node_label.smiles")
|
||||||
|
pseudo: bool = Field(False, alias="pseudo")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def resolve_atom_count(obj: Node):
|
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,
|
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
|
# Update depths as sideeffect of above operation
|
||||||
pw.update_depths()
|
pw.update_depths()
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ def get_parameter(request, paramname):
|
|||||||
res = request.POST.get(paramname)
|
res = request.POST.get(paramname)
|
||||||
if res is not None and res.strip() != "":
|
if res is not None and res.strip() != "":
|
||||||
return res
|
return res
|
||||||
return ValueError("Not all parameters are set!")
|
raise ValueError("Not all parameters are set!")
|
||||||
|
|
||||||
|
|
||||||
def get_parameter_or_empty_string(request, paramname):
|
def get_parameter_or_empty_string(request, paramname):
|
||||||
|
|||||||
Reference in New Issue
Block a user