fix: false draft-restored message

This commit is contained in:
Björn Fromme
2026-08-31 09:31:00 +02:00
parent bfad61f1dd
commit 81b724c11a
4 changed files with 244 additions and 5 deletions
+5 -3
View File
@@ -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);