Fix: Unable to reset email settings (#6963)

This commit is contained in:
Nicolas Dorier
2025-10-23 17:29:42 +09:00
committed by GitHub
parent 02adde7fd5
commit 42490c389d
2 changed files with 13 additions and 22 deletions

View File

@@ -79,8 +79,6 @@ public class UIStoresEmailController(
{
ModelState.AddModelError("Settings.From", StringLocalizer["Invalid email"]);
}
if (!ModelState.IsValid)
return View(model);
}
var storeBlob = store.GetStoreBlob();
@@ -88,6 +86,9 @@ public class UIStoresEmailController(
if (model is { IsCustomSMTP: true, Settings: { Password: null } })
model.Settings.Password = currentSettings?.Password;
if (!ModelState.IsValid && command is not ("ResetPassword" or "mailpit"))
return View(model);
if (command == "Test")
{
try