mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Fix workflow ID type on download (#1956)
This commit is contained in:
parent
de3b5608ca
commit
922880f93d
|
@ -202,7 +202,7 @@ export interface IVariableSelectorOption {
|
||||||
|
|
||||||
// Simple version of n8n-workflow.Workflow
|
// Simple version of n8n-workflow.Workflow
|
||||||
export interface IWorkflowData {
|
export interface IWorkflowData {
|
||||||
id?: string;
|
id?: string | number;
|
||||||
name?: string;
|
name?: string;
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
nodes: INode[];
|
nodes: INode[];
|
||||||
|
@ -212,7 +212,7 @@ export interface IWorkflowData {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IWorkflowDataUpdate {
|
export interface IWorkflowDataUpdate {
|
||||||
id?: string;
|
id?: string | number;
|
||||||
name?: string;
|
name?: string;
|
||||||
nodes?: INode[];
|
nodes?: INode[];
|
||||||
connections?: IConnections;
|
connections?: IConnections;
|
||||||
|
|
|
@ -408,6 +408,9 @@ export default mixins(
|
||||||
const workflowData = await this.getWorkflowDataToSave();
|
const workflowData = await this.getWorkflowDataToSave();
|
||||||
|
|
||||||
const {tags, ...data} = workflowData;
|
const {tags, ...data} = workflowData;
|
||||||
|
if (data.id && typeof data.id === 'string') {
|
||||||
|
data.id = parseInt(data.id, 10);
|
||||||
|
}
|
||||||
const blob = new Blob([JSON.stringify(data, null, 2)], {
|
const blob = new Blob([JSON.stringify(data, null, 2)], {
|
||||||
type: 'application/json;charset=utf-8',
|
type: 'application/json;charset=utf-8',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue