Skip to content

Commit

Permalink
Fix squashing for integrationUuid and listQuestionUuid
Browse files Browse the repository at this point in the history
  • Loading branch information
vknaisl committed Oct 21, 2024
1 parent 5cf5fa8 commit e46b7cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e46b7cf

Please sign in to comment.