Fix build not working when building at node
This commit is contained in:
parent
63ed8c324b
commit
2670da5ba8
2 changed files with 6 additions and 5 deletions
|
|
@ -872,7 +872,7 @@ export async function postBuildVertex(
|
|||
vertexId: string,
|
||||
input_value: string,
|
||||
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
||||
return await api.post(`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`, {inputs: {input_value: input_value}});
|
||||
return await api.post(`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`, input_value ? {inputs: {input_value: input_value}} : undefined);
|
||||
}
|
||||
|
||||
export async function downloadImage({ flowId, fileName }): Promise<any> {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ function getInactiveVertexData(vertexId: string): VertexBuildTypeAPI {
|
|||
return inactiveVertexData;
|
||||
}
|
||||
|
||||
export async function updateVerticesOrder(flowId: string, nodeId: string | null) {
|
||||
export async function updateVerticesOrder(flowId: string, nodeId: string | null): Promise<{ verticesLayers: string[][], verticesIds: string[], verticesOrder: string[][], runId: string }> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const setErrorData = useAlertStore.getState().setErrorData;
|
||||
let orderResponse;
|
||||
|
|
@ -80,6 +80,7 @@ export async function updateVerticesOrder(flowId: string, nodeId: string | null)
|
|||
useFlowStore
|
||||
.getState()
|
||||
.updateVerticesBuild({ verticesLayers, verticesIds, verticesOrder, runId });
|
||||
resolve({ verticesLayers, verticesIds, verticesOrder, runId });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -94,9 +95,9 @@ export async function buildVertices({
|
|||
onBuildStart,
|
||||
validateNodes,
|
||||
}: BuildVerticesParams) {
|
||||
const verticesBuild = useFlowStore.getState().verticesBuild;
|
||||
if (!verticesBuild) {
|
||||
await updateVerticesOrder(flowId, nodeId);
|
||||
let verticesBuild = useFlowStore.getState().verticesBuild;
|
||||
if (!verticesBuild || nodeId) {
|
||||
verticesBuild = await updateVerticesOrder(flowId, nodeId);
|
||||
}
|
||||
const verticesIds = verticesBuild?.verticesIds!;
|
||||
const verticesLayers = verticesBuild?.verticesLayers!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue