From fbe17505102b1936b12da0a9285747d2c0627482433b9814461b8ba43b9b6df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= <93217193+Daniel-Garmig@users.noreply.github.com> Date: Thu, 17 Sep 2026 17:24:58 +0200 Subject: [PATCH] GuestDocument - Page create - Bugfix Fixed a bug that caused exceptions when "Create New" button was clicked before searching if GuestDocument already exists. --- .../Pages/GuestDocuments/GuestDocNew.razor | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Somnia.GuestLog/Components/Pages/GuestDocuments/GuestDocNew.razor b/src/Somnia.GuestLog/Components/Pages/GuestDocuments/GuestDocNew.razor index 7d0b106..7183194 100644 --- a/src/Somnia.GuestLog/Components/Pages/GuestDocuments/GuestDocNew.razor +++ b/src/Somnia.GuestLog/Components/Pages/GuestDocuments/GuestDocNew.razor @@ -18,10 +18,13 @@ New Guest Document - - @LanguageLocale.general_btnCreate - + @if (currentPageMode == ePageMode.createNew) + { + + @LanguageLocale.general_btnCreate + + } @LanguageLocale.general_btnReturn @@ -129,6 +132,8 @@ private async Task BtnSaveNewGuest() { + Debug.Assert(currentPageMode == ePageMode.createNew && _form != null); + bool isFormValid = await _form.ValidateForm(); if (!isFormValid) {