Commit Graph

4 Commits

Author SHA1 Message Date
Kevin Ansfield
96ec60e393
🐛 Fixed "Create Post" action error in Zapier when assigning new tags (#13972)
closes https://github.com/TryGhost/Zapier/issues/56

- fixes tag creation when creating posts with `tags: [{slug: 'new'}]` which should be supported
  - assigning tags with only `{slug: 'new'}` was triggering our validation for the required `name` property then bubbling up to the `bookshelf-relations` library resulting in a 500 error
  - the fix applied here is to set the `name` field to the same as the `slug` field if a name is not provided
2022-01-14 13:37:20 +00:00
Hannah Wolfe
79233b1181 Removed unnecessary load of settings
- seems to save about a second locally for me - I'll take it!
2021-11-19 10:47:21 +00:00
Sam Lord
620c12b05f Amend previous commit to prevent console.log
no issue

Large amount of unstaged changes prevented me from catching this
2021-11-16 17:12:39 +00:00
Sam Lord
a5484a0fe1 Fixed transaction logic in data importer
https://github.com/TryGhost/Toolbox/issues/130

The transaction no longer commits in the promise chain, which wasn't
valid logic for a transaction, since it is commited automatically when
the promise chain resolves, and rollsback automatically when the
promise chain rejects.

This makes code which fails during the transaction error in the right
place, instead of getting stuck here. (Especially good for writing
tests).

The tests for this code can now live in the integration folder.
2021-11-16 17:09:55 +00:00