mirror of
https://github.com/strapi/strapi.git
synced 2026-01-04 11:16:32 +00:00
chore: cleanup
This commit is contained in:
parent
5985781a9a
commit
7ff725ed6c
@ -69,8 +69,9 @@ const decorator = (service) => ({
|
||||
const previousStage = await getEntityStage(uid, entityId);
|
||||
|
||||
const updatedEntity = await service.update.call(this, uid, entityId, { ...opts, data });
|
||||
const updatedStage = updatedEntity[ENTITY_STAGE_ATTRIBUTE];
|
||||
|
||||
if (previousStage?.id && previousStage.id !== updatedEntity[ENTITY_STAGE_ATTRIBUTE].id) {
|
||||
if (previousStage?.id && previousStage.id !== updatedStage.id) {
|
||||
const model = strapi.getModel(uid);
|
||||
|
||||
strapi.eventHub.emit(WORKFLOW_UPDATE_STAGE, {
|
||||
@ -87,8 +88,8 @@ const decorator = (service) => ({
|
||||
name: previousStage.name,
|
||||
},
|
||||
to: {
|
||||
id: updatedEntity[ENTITY_STAGE_ATTRIBUTE].id,
|
||||
name: updatedEntity[ENTITY_STAGE_ATTRIBUTE].name,
|
||||
id: updatedStage.id,
|
||||
name: updatedStage.name,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user