fix: false draft-restored message
This commit is contained in:
@@ -172,9 +172,11 @@ class BookingEditDataLoader
|
||||
$draft = $this->draftService->findDraft($user, $bookingId);
|
||||
if (null !== $draft) {
|
||||
$applied = $this->draftService->applyDraftToDto($draft, $formData, $travelData);
|
||||
if (true === $applied) {
|
||||
$this->draftRestored = true;
|
||||
}
|
||||
|
||||
// A draft that reproduces the API state exactly is not a restore. Reporting
|
||||
// it would tell the user their draft was restored for edits they never made.
|
||||
$this->draftRestored = true === $applied
|
||||
&& $formData->originalFingerprint !== $this->fingerprintService->generateFingerprint($formData);
|
||||
}
|
||||
|
||||
$this->bookingSessionService->saveBookingDto($request, $formData, BookingDto::MODE_EDIT);
|
||||
|
||||
Reference in New Issue
Block a user