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 bc280e228..32ca5bb1e 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Event/Question.hs @@ -137,7 +137,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 } @@ -154,6 +154,6 @@ 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 } 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..7743a0866 100644 --- a/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs +++ b/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Squash/SquasherSpec.hs @@ -48,7 +48,7 @@ squasherSpec = , a_q2' , e_q2_title' , 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' , EditReferenceEvent' . EditURLReferenceEvent' $ e_ref1_url {createdAt = e_ref1_type.createdAt} , e_ch1_label_3_day2' @@ -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: