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

fix(core): Publish event when deleting FacetValue

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

+ 1 - 0
packages/core/src/service/services/facet-value.service.ts

@@ -151,6 +151,7 @@ export class FacetValueService {
         if (!isInUse) {
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);
             await this.connection.getRepository(ctx, FacetValue).remove(facetValue);
+            this.eventBus.publish(new FacetValueEvent(ctx, facetValue, 'deleted', id));
             result = DeletionResult.DELETED;
         } else if (force) {
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);