mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix workflow saving
'id' should not be omitted when building a workflow, it makes workflows always save as a copy
This commit is contained in:
parent
08ef71a74e
commit
1af4260ab6
@ -1,9 +1,9 @@
|
||||
import { enqueueRequested } from 'app/store/actions';
|
||||
import { buildNodesGraph } from 'features/nodes/util/graph/buildNodesGraph';
|
||||
import { buildWorkflow } from 'features/nodes/util/workflow/buildWorkflow';
|
||||
import { queueApi } from 'services/api/endpoints/queue';
|
||||
import { BatchConfig } from 'services/api/types';
|
||||
import { startAppListening } from '..';
|
||||
import { buildWorkflow } from 'features/nodes/util/workflow/buildWorkflow';
|
||||
|
||||
export const addEnqueueRequestedNodes = () => {
|
||||
startAppListening({
|
||||
@ -19,6 +19,10 @@ export const addEnqueueRequestedNodes = () => {
|
||||
edges,
|
||||
workflow,
|
||||
});
|
||||
|
||||
// embedded workflows don't have an id
|
||||
delete builtWorkflow.id;
|
||||
|
||||
const batchConfig: BatchConfig = {
|
||||
batch: {
|
||||
graph,
|
||||
|
@ -24,12 +24,12 @@ export const buildWorkflow: BuildWorkflowFunction = ({
|
||||
edges,
|
||||
workflow,
|
||||
}) => {
|
||||
const clonedWorkflow = cloneDeep(workflow);
|
||||
const clonedWorkflow = omit(cloneDeep(workflow), 'isTouched');
|
||||
const clonedNodes = cloneDeep(nodes);
|
||||
const clonedEdges = cloneDeep(edges);
|
||||
|
||||
const newWorkflow: WorkflowV2 = {
|
||||
...omit(clonedWorkflow, 'isTouched', 'id'),
|
||||
...clonedWorkflow,
|
||||
nodes: [],
|
||||
edges: [],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user