mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed update method for Products repository
no-issue When updating a Product we can pass existing Stripe Prices, these will either be adding to the database, or updated if they already exist. When updating them we were attemping to use the `id` passed in the update, which is not necessarily included. Instead we should use the `id` of the StripePrice which we have already retrieved from the database.
This commit is contained in:
parent
20e5dcc91d
commit
4e98c62b71
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ class ProductRepository {
|
|||
nickname: existingPrice.nickname
|
||||
}, {
|
||||
...options,
|
||||
id: existingPrice.id || options.id
|
||||
id: stripePrice.id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue