diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs index 90dc3725f..c4036ce64 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs @@ -144,7 +144,7 @@ instance SimpleEventSquash EditQuestionEvent where , tagUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.tagUuids) , expertUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.expertUuids) , referenceUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.referenceUuids) - , integrationUuid = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.integrationUuid) + , integrationUuid = applyValue oldEvent newEvent (.integrationUuid) , props = applyValue oldEvent newEvent (.props) , createdAt = oldEvent.createdAt } @@ -161,7 +161,7 @@ instance SimpleEventSquash EditQuestionEvent where , tagUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.tagUuids) , expertUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.expertUuids) , referenceUuids = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.referenceUuids) - , listQuestionUuid = applyValueIfSameEntity mPreviousEvent oldEvent newEvent (.listQuestionUuid) + , listQuestionUuid = applyValue oldEvent newEvent (.listQuestionUuid) , createdAt = oldEvent.createdAt } simpleSquashEvent mPreviousEvent (EditFileQuestionEvent' oldEvent) (EditFileQuestionEvent' newEvent) = diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs index 4359946d3..544285a16 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs @@ -73,7 +73,7 @@ squashReorderEvents events = let squashedEvent = simpleSquashEvent mPreviousEvent previousEvent newEvent eventsToDeleted' = previousEvent : eventsToDeleted events' = squashedEvent : events - in (eventsToDeleted', events', Just newEvent) + in (eventsToDeleted', events', Just squashedEvent) Nothing -> let eventsToDeleted' = eventsToDeleted events' = newEvent : events diff --git a/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs b/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs index ae59257d2..49053c798 100644 --- a/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs +++ b/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs @@ -113,7 +113,7 @@ squasherSpec = let expEvents = [ e_q1_text' , a_q3' - , EditQuestionEvent' . EditOptionsQuestionEvent' $ e_q1_title_2 {answerUuids = e_q1_answerUuids_title.answerUuids, createdAt = e_q1_answerUuids_title.createdAt} + , EditQuestionEvent' . EditOptionsQuestionEvent' $ e_q1_title_2 {answerUuids = e_q1_answerUuids_title.answerUuids, createdAt = e_q1_answerUuids.createdAt} , e_q1_type' ] -- WHEN: