Просмотр исходного кода

fix(core): Check existence of ProductVariant before updating

Michael Bromley 6 лет назад
Родитель
Сommit
fe5eedd233
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      packages/core/src/service/services/product-variant.service.ts

+ 1 - 0
packages/core/src/service/services/product-variant.service.ts

@@ -167,6 +167,7 @@ export class ProductVariantService {
     }
 
     async update(ctx: RequestContext, input: UpdateProductVariantInput): Promise<Translated<ProductVariant>> {
+        await getEntityOrThrow(this.connection, ProductVariant, input.id);
         await this.translatableSaver.update({
             input,
             entityType: ProductVariant,