Skip to content

Commit

Permalink
fix(editor): Prevent storing pairedItem data inside of pinData (#8173)
Browse files Browse the repository at this point in the history
## Summary
When pinning data after an execution, the pairedItem data gets stored in
the pinData field. This creates problems during executions.

Before:
<img width="1141" alt="image"
src="https://github.com/n8n-io/n8n/assets/6179477/e555d00a-6ff2-4601-8072-3194a0c5e1c2">

After: 
<img width="1140" alt="image"
src="https://github.com/n8n-io/n8n/assets/6179477/d97e9d90-28f5-4dcc-b63e-62497c646994">


## Related tickets and issues

https://linear.app/n8n/issue/PAY-812/wrong-error-shown-when-paireditem-fails-because-of-incorrect-pinned


## Review / Merge checklist
- [x] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [x] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [x] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.
  • Loading branch information
alexgrozav authored Dec 28, 2023
1 parent c84d3c3 commit 405e267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor-ui/src/stores/workflows.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
}

const storedPinData = payload.data.map((item) =>
isJsonKeyObject(item) ? item : { json: item },
isJsonKeyObject(item) ? { json: item.json } : { json: item },
);

this.workflow = {
Expand Down

0 comments on commit 405e267

Please sign in to comment.