0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Removed superfluous benefits relation fetch

refs https://github.com/TryGhost/Team/issues/919

As we pass the `benefits` to the Product model on creation, we do not
need to manually fetch them again. In fact doing so causes a strange SQL
error, where we attempt to run `SELECT undefined.*`.
This commit is contained in:
Fabien O'Carroll 2021-07-20 12:24:53 +01:00 committed by Fabien 'egg' O'Carroll
parent 19ae16590d
commit 6693d470d0

View file

@ -211,7 +211,6 @@ class ProductRepository {
await product.related('stripePrices').fetch(options);
await product.related('monthlyPrice').fetch(options);
await product.related('yearlyPrice').fetch(options);
await product.related('benefits').fetch(options);
}
return product;