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 22, 2024
1 parent e6d279a commit 5af5d30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
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 @@ -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'
Expand Down 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 5af5d30

Please sign in to comment.